I am new to Python and wonder where can I can all the available arguments for the FunctionType
in the types
package?
I can found the related source code in here: https://github.com/python/cpython/blob/3.9/Lib/types.py
But I don't find clear definition of FunctionType
.
use inspect.getargspec
>>> import inspect
>>> def foobar(foo, bar, baz):
... return inspect.getargspec(foobar)
...
>>> foobar(1, 2, 3)
ArgSpec(args=['foo', 'bar', 'baz'], varargs=None, keywords=None, defaults=None)
check this for reference:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.