summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorKa-Ping Yee <ping@zesty.ca>2001-03-23 15:29:59 (GMT)
committerKa-Ping Yee <ping@zesty.ca>2001-03-23 15:29:59 (GMT)
commita9c6c8dab5c851271ae488e8559e1dd69875c77e (patch)
tree638a76883ec63daf30641c73063be3728a7dc299 /Lib
parent324cc6ee0e47e316c5ba9fa02a701de8062714f8 (diff)
downloadcpython-a9c6c8dab5c851271ae488e8559e1dd69875c77e.zip
cpython-a9c6c8dab5c851271ae488e8559e1dd69875c77e.tar.gz
cpython-a9c6c8dab5c851271ae488e8559e1dd69875c77e.tar.bz2
Extend isclass() to work for extension classes (by looking for __bases__).
Diffstat (limited to 'Lib')
-rw-r--r--Lib/inspect.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index ef813a6..eeb3034 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -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.