Get the names and default values of a Python function’s arguments. A
tuple of four things is returned: (args, varargs, keywords, defaults).
args is a list of the argument names (it may contain nested lists).
varargs and keywords are the names of the * and ** arguments or None.
defaults is a tuple of default argument values or None if there are no
default arguments; if this tuple has n elements, they correspond to
the last n elements listed in args.
Changed in version 2.6: Returns a named tupleArgSpec(args, varargs,
keywords, defaults).
^{}
这只适用于用Python编写的实际函数;其他可调用函数(如类型或内置函数)将不兼容。你知道吗
相关问题 更多 >
编程相关推荐