Kaydet (Commit) e82881ce authored tarafından Guido van Rossum's avatar Guido van Rossum

Fix getargspec() doctring (varkw -> keywords).

üst 99233412
...@@ -914,10 +914,9 @@ ArgSpec = namedtuple('ArgSpec', 'args varargs keywords defaults') ...@@ -914,10 +914,9 @@ ArgSpec = namedtuple('ArgSpec', 'args varargs keywords defaults')
def getargspec(func): def getargspec(func):
"""Get the names and default values of a function's arguments. """Get the names and default values of a function's arguments.
A tuple of four things is returned: (args, varargs, varkw, defaults). A tuple of four things is returned: (args, varargs, keywords, defaults).
'args' is a list of the argument names. 'args' is a list of the argument names, including keyword-only argument names.
'args' will include keyword-only argument names. 'varargs' and 'keywords' are the names of the * and ** arguments or None.
'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. 'defaults' is an n-tuple of the default values of the last n arguments.
Use the getfullargspec() API for Python 3 code, as annotations Use the getfullargspec() API for Python 3 code, as annotations
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment