summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorKa-Ping Yee <ping@zesty.ca>2001-04-13 14:04:02 (GMT)
committerKa-Ping Yee <ping@zesty.ca>2001-04-13 14:04:02 (GMT)
commit022171fa2195e5958d678605457b0f8741dd901d (patch)
treea9f2f5b6c3fcee39d6384f1f3291e9562d181d92 /Lib
parent9bc576b7f6fa4bbe726255666ac7e5728f1d678b (diff)
downloadcpython-022171fa2195e5958d678605457b0f8741dd901d.zip
cpython-022171fa2195e5958d678605457b0f8741dd901d.tar.gz
cpython-022171fa2195e5958d678605457b0f8741dd901d.tar.bz2
Clean up isroutine().
Diffstat (limited to 'Lib')
-rw-r--r--Lib/inspect.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index c358a5c..2d88bc1 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -127,8 +127,7 @@ def isbuiltin(object):
def isroutine(object):
"""Return true if the object is any kind of function or method."""
- return type(object) in [types.FunctionType, types.LambdaType,
- types.MethodType, types.BuiltinFunctionType]
+ return isbuiltin(object) or isfunction(object) or ismethod(object)
def getmembers(object, predicate=None):
"""Return all members of an object as (name, value) pairs sorted by name.