summaryrefslogtreecommitdiff
path: root/Lib/inspect.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index c358a5c57e..2d88bc1f64 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.