code: def isroutine(object):
      
      return (isbuiltin(object)
              or isfunction(object)
              or ismethod(object)
              or ismethoddescriptor(object))
docs: Return true if the object is any kind of function or method.