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' i
(func)
| 94 | return args, varargs, varkw |
| 95 | |
| 96 | def getargspec(func): |
| 97 | """Get the names and default values of a function's arguments. |
| 98 | |
| 99 | A tuple of four things is returned: (args, varargs, varkw, defaults). |
| 100 | 'args' is a list of the argument names (it may contain nested lists). |
| 101 | 'varargs' and 'varkw' are the names of the * and ** arguments or None. |
| 102 | 'defaults' is an n-tuple of the default values of the last n arguments. |
| 103 | |
| 104 | """ |
| 105 | |
| 106 | if ismethod(func): |
| 107 | func = func.__func__ |
| 108 | if not isfunction(func): |
| 109 | raise TypeError('arg is not a Python function') |
| 110 | args, varargs, varkw = getargs(func.__code__) |
| 111 | return args, varargs, varkw, func.__defaults__ |
| 112 | |
| 113 | def getargvalues(frame): |
| 114 | """Get information about arguments passed into a particular frame. |
no test coverage detected