Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bf84bba

Browse files
committed
Mention that "defaults" can be None for inspect.getfullargspec.
Also minor formatting cleanups.
1 parent 88950fb commit bf84bba

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

Doc/library/inspect.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -675,9 +675,9 @@ Classes and functions
675675
:term:`named tuple` ``ArgSpec(args, varargs, keywords, defaults)`` is
676676
returned. *args* is a list of the argument names. *varargs* and *keywords*
677677
are the names of the ``*`` and ``**`` arguments or ``None``. *defaults* is a
678-
tuple of default argument values or None if there are no default arguments;
679-
if this tuple has *n* elements, they correspond to the last *n* elements
680-
listed in *args*.
678+
tuple of default argument values or ``None`` if there are no default
679+
arguments; if this tuple has *n* elements, they correspond to the last
680+
*n* elements listed in *args*.
681681

682682
.. deprecated:: 3.0
683683
Use :func:`getfullargspec` instead, which provides information about
@@ -693,8 +693,9 @@ Classes and functions
693693
annotations)``
694694

695695
*args* is a list of the argument names. *varargs* and *varkw* are the names
696-
of the ``*`` and ``**`` arguments or ``None``. *defaults* is an n-tuple of
697-
the default values of the last n arguments. *kwonlyargs* is a list of
696+
of the ``*`` and ``**`` arguments or ``None``. *defaults* is an *n*-tuple
697+
of the default values of the last *n* arguments, or ``None`` if there are no
698+
default arguments. *kwonlyargs* is a list of
698699
keyword-only argument names. *kwonlydefaults* is a dictionary mapping names
699700
from kwonlyargs to defaults. *annotations* is a dictionary mapping argument
700701
names to annotations.

0 commit comments

Comments
 (0)