Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9bc576b commit 022171fCopy full SHA for 022171f
1 file changed
Lib/inspect.py
@@ -127,8 +127,7 @@ def isbuiltin(object):
127
128
def isroutine(object):
129
"""Return true if the object is any kind of function or method."""
130
- return type(object) in [types.FunctionType, types.LambdaType,
131
- types.MethodType, types.BuiltinFunctionType]
+ return isbuiltin(object) or isfunction(object) or ismethod(object)
132
133
def getmembers(object, predicate=None):
134
"""Return all members of an object as (name, value) pairs sorted by name.
0 commit comments