mirror of
https://github.com/python/cpython.git
synced 2025-07-31 23:23:11 +00:00
Mention that "defaults" can be None for inspect.getfullargspec.
Also minor formatting cleanups.
This commit is contained in:
parent
88950fb4d0
commit
bf84bbabbb
1 changed files with 6 additions and 5 deletions
|
@ -675,9 +675,9 @@ Classes and functions
|
||||||
:term:`named tuple` ``ArgSpec(args, varargs, keywords, defaults)`` is
|
:term:`named tuple` ``ArgSpec(args, varargs, keywords, defaults)`` is
|
||||||
returned. *args* is a list of the argument names. *varargs* and *keywords*
|
returned. *args* is a list of the argument names. *varargs* and *keywords*
|
||||||
are the names of the ``*`` and ``**`` arguments or ``None``. *defaults* is a
|
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;
|
tuple of default argument values or ``None`` if there are no default
|
||||||
if this tuple has *n* elements, they correspond to the last *n* elements
|
arguments; if this tuple has *n* elements, they correspond to the last
|
||||||
listed in *args*.
|
*n* elements listed in *args*.
|
||||||
|
|
||||||
.. deprecated:: 3.0
|
.. deprecated:: 3.0
|
||||||
Use :func:`getfullargspec` instead, which provides information about
|
Use :func:`getfullargspec` instead, which provides information about
|
||||||
|
@ -693,8 +693,9 @@ Classes and functions
|
||||||
annotations)``
|
annotations)``
|
||||||
|
|
||||||
*args* is a list of the argument names. *varargs* and *varkw* are the names
|
*args* is a list of the argument names. *varargs* and *varkw* are the names
|
||||||
of the ``*`` and ``**`` arguments or ``None``. *defaults* is an n-tuple of
|
of the ``*`` and ``**`` arguments or ``None``. *defaults* is an *n*-tuple
|
||||||
the default values of the last n arguments. *kwonlyargs* is a list of
|
of the default values of the last *n* arguments, or ``None`` if there are no
|
||||||
|
default arguments. *kwonlyargs* is a list of
|
||||||
keyword-only argument names. *kwonlydefaults* is a dictionary mapping names
|
keyword-only argument names. *kwonlydefaults* is a dictionary mapping names
|
||||||
from kwonlyargs to defaults. *annotations* is a dictionary mapping argument
|
from kwonlyargs to defaults. *annotations* is a dictionary mapping argument
|
||||||
names to annotations.
|
names to annotations.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue