def isAttr(o):
# in fact, 'inspect.is<predicate>' predicates are useless. They still return all
# the members of e.g. a "dict()". Because all of the methods of 'dict' are now
# of type <method-wrapper>. Gah!
#return not (inspect.isfunction(o) or inspect.ismethod(o))
return not (inspect.isbuiltin(o) or o is methodwrappert)
评论列表
文章目录