Ka-Ping Yee  committed 0b69e17

Clean up isroutine().

  • Participants
  • Parent commits 25f55b2
  • Branches legacy-trunk

Comments (0)

Files changed (1)

File Lib/

 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.