summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-11-25 09:39:14 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-11-25 09:39:14 (GMT)
commit4a22b5dee77b6a3439e4a09362586c390bbdef02 (patch)
tree670472c02e788fe4d027f7967fbbd8253e18cb5f /Lib/inspect.py
parent91c77301bf0246deabcdcd80bc7bedb169e2f964 (diff)
downloadcpython-4a22b5dee77b6a3439e4a09362586c390bbdef02.zip
cpython-4a22b5dee77b6a3439e4a09362586c390bbdef02.tar.gz
cpython-4a22b5dee77b6a3439e4a09362586c390bbdef02.tar.bz2
Patch from Georg Brandl and me for #1493
Remove unbound method objects
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index d0608d7..3a95796 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -57,7 +57,7 @@ def ismethod(object):
__name__ name with which this method was defined
im_class class object in which this method belongs
im_func function object containing implementation of method
- im_self instance to which this method is bound, or None"""
+ im_self instance to which this method is bound"""
return isinstance(object, types.MethodType)
def ismethoddescriptor(object):
@@ -269,7 +269,7 @@ def classify_class_attrs(cls):
kind = "class method"
elif isinstance(obj, property):
kind = "property"
- elif (ismethod(obj_via_getattr) or
+ elif (isfunction(obj_via_getattr) or
ismethoddescriptor(obj_via_getattr)):
kind = "method"
else: