Oct-05-2016, 04:58 PM
(This post was last modified: Oct-05-2016, 05:00 PM by Crimson King.)
If by user-defined functions you mean functions that you've written yourself in your current file, like:
The thing is, if you import a function directly from a module:
PS: in my print statement, it should read f.__name__
def myfunc(): passThen having a print statement could be of some help:
import types print [f.__name__ for f in globals().values() if type(f) == types.FunctionType]That statement will print the name of all type 'function' objects.
The thing is, if you import a function directly from a module:
from requests import getThe get function from the requests module will now be listed in the previously mentioned print statement.
PS: in my print statement, it should read f.__name__