def describe_klass(obj):
""" Describe the class object passed as argument,
including its methods """
wi('+Class: %s' % obj.__name__)
indent()
count = 0
for name in obj.__dict__:
item = getattr(obj, name)
if inspect.ismethod(item):
count += 1;describe_func(item, True)
if count==0:
wi('(No members)')
dedent()
print
评论列表
文章目录