def isroutine(object):
    """Return true if the object is any kind of function or method."""
    return (isbuiltin(object)
            or isfunction(object)
            or ismethod(object)
            or ismethoddescriptor(object))
Return true if the object is any kind of function or method.
debugger/src/_pydev_imps/_pydev_inspect.py