Commits

Ka-Ping Yee  committed bacac75

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

  • Participants
  • Parent commits d718c29
  • Branches legacy-trunk

Comments (0)

Files changed (1)

File Lib/inspect.py

     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.