summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-10-09 22:05:45 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-10-09 22:05:45 (GMT)
commitde0559998fef231efc9ecbdef5b3a195d4eaa28d (patch)
tree235b05866ae52f80d81f2953c663d74f1de6dae1 /Lib/idlelib
parent0c8bee639368324b750176ee171cadd33847f18e (diff)
downloadcpython-de0559998fef231efc9ecbdef5b3a195d4eaa28d.zip
cpython-de0559998fef231efc9ecbdef5b3a195d4eaa28d.tar.gz
cpython-de0559998fef231efc9ecbdef5b3a195d4eaa28d.tar.bz2
replace callable()
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/rpc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/idlelib/rpc.py b/Lib/idlelib/rpc.py
index d492984..b3b786d 100644
--- a/Lib/idlelib/rpc.py
+++ b/Lib/idlelib/rpc.py
@@ -570,7 +570,7 @@ def _getmethods(obj, methods):
# Adds names to dictionary argument 'methods'
for name in dir(obj):
attr = getattr(obj, name)
- if callable(attr):
+ if hasattr(attr, '__call__'):
methods[name] = 1
if type(obj) == types.InstanceType:
_getmethods(obj.__class__, methods)
@@ -581,7 +581,7 @@ def _getmethods(obj, methods):
def _getattributes(obj, attributes):
for name in dir(obj):
attr = getattr(obj, name)
- if not callable(attr):
+ if not hasattr(attr, '__call__'):
attributes[name] = 1
class MethodProxy(object):