mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Closes issue 14634. unittest.mock.create_autospec now supports keyword only arguments.
This commit is contained in:
parent
2cd48738ba
commit
3af125a4aa
3 changed files with 31 additions and 8 deletions
|
@ -440,11 +440,16 @@ Classes and functions
|
|||
locals dictionary of the given frame.
|
||||
|
||||
|
||||
.. function:: formatargspec(args[, varargs, varkw, defaults, formatarg, formatvarargs, formatvarkw, formatvalue])
|
||||
.. function:: formatargspec(args[, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations, formatarg, formatvarargs, formatvarkw, formatvalue, formatreturns, formatannotations])
|
||||
|
||||
Format a pretty argument spec from the four values returned by
|
||||
:func:`getargspec`. The format\* arguments are the corresponding optional
|
||||
formatting functions that are called to turn names and values into strings.
|
||||
Format a pretty argument spec from the values returned by
|
||||
:func:`getargspec` or :func:`getfullargspec`.
|
||||
|
||||
The first seven arguments are (``args``, ``varargs``, ``varkw``,
|
||||
``defaults``, ``kwonlyargs``, ``kwonlydefaults``, ``annotations``). The
|
||||
other five arguments are the corresponding optional formatting functions
|
||||
that are called to turn names and values into strings. The last argument
|
||||
is an optional function to format the sequence of arguments.
|
||||
|
||||
|
||||
.. function:: formatargvalues(args[, varargs, varkw, locals, formatarg, formatvarargs, formatvarkw, formatvalue])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue