Kaydet (Commit) a9c6c8da authored tarafından Ka-Ping Yee's avatar Ka-Ping Yee

Extend isclass() to work for extension classes (by looking for __bases__).

üst 324cc6ee
......@@ -44,7 +44,7 @@ def isclass(object):
Class objects provide these attributes:
__doc__ documentation string
__module__ name of module in which this class was defined"""
return type(object) is types.ClassType
return type(object) is types.ClassType or hasattr(object, '__bases__')
def ismethod(object):
"""Return true if the object is an instance method.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment