Subset of inspect module from upstream python
We use this instead of upstream because upstream inspect is slow to import, and significantly contributes to numpy import times. Importing this copy has almost no overhead.
Constant | CO_NEWLOCALS |
Undocumented |
Constant | CO_OPTIMIZED |
Undocumented |
Constant | CO_VARARGS |
Undocumented |
Constant | CO_VARKEYWORDS |
Undocumented |
Function | formatargspec |
Format an argument spec from the 4 values returned by getargspec. |
Function | formatargvalues |
Format an argument spec from the 4 values returned by getargvalues. |
Function | getargs |
Get information about the arguments accepted by a code object. |
Function | getargspec |
Get the names and default values of a function's arguments. |
Function | getargvalues |
Get information about arguments passed into a particular frame. |
Function | iscode |
Return true if the object is a code object. |
Function | isfunction |
Return true if the object is a user-defined function. |
Function | ismethod |
Return true if the object is an instance method. |
Function | joinseq |
Undocumented |
Function | strseq |
Recursively walk a sequence, stringifying each element. |
Format an argument spec from the 4 values returned by getargspec.
The first four arguments are (args, varargs, varkw, defaults). The other four arguments are the corresponding optional formatting functions that are called to turn names and values into strings. The ninth argument is an optional function to format the sequence of arguments.
Format an argument spec from the 4 values returned by getargvalues.
The first four arguments are (args, varargs, varkw, locals). The next four arguments are the corresponding optional formatting functions that are called to turn names and values into strings. The ninth argument is an optional function to format the sequence of arguments.
Get information about the arguments accepted by a code object.
Three things are returned: (args, varargs, varkw), where 'args' is a list of argument names (possibly containing nested lists), and 'varargs' and 'varkw' are the names of the * and ** arguments or None.
Get the names and default values of a function's arguments.
A tuple of four things is returned: (args, varargs, varkw, defaults). 'args' is a list of the argument names (it may contain nested lists). 'varargs' and 'varkw' are the names of the * and ** arguments or None. 'defaults' is an n-tuple of the default values of the last n arguments.
Get information about arguments passed into a particular frame.
A tuple of four things is returned: (args, varargs, varkw, locals). 'args' is a list of the argument names (it may contain nested lists). 'varargs' and 'varkw' are the names of the * and ** arguments or None. 'locals' is the locals dictionary of the given frame.
Return true if the object is a code object.
Return true if the object is a user-defined function.
Return true if the object is an instance method.