[Python-checkins] cpython: Mention that "defaults" can be None for inspect.getfullargspec.
larry.hastings
python-checkins at python.org
Fri Sep 21 18:40:57 CEST 2012
http://hg.python.org/cpython/rev/b0ad15e15dab
changeset: 79092:b0ad15e15dab
user: Larry Hastings <larry at hastings.org>
date: Fri Sep 21 09:40:41 2012 -0700
summary:
Mention that "defaults" can be None for inspect.getfullargspec.
Also minor formatting cleanups.
files:
Doc/library/inspect.rst | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst
--- a/Doc/library/inspect.rst
+++ b/Doc/library/inspect.rst
@@ -675,9 +675,9 @@
:term:`named tuple` ``ArgSpec(args, varargs, keywords, defaults)`` is
returned. *args* is a list of the argument names. *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*.
+ 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*.
.. deprecated:: 3.0
Use :func:`getfullargspec` instead, which provides information about
@@ -693,8 +693,9 @@
annotations)``
*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
- the default values of the last n arguments. *kwonlyargs* is a list of
+ of the ``*`` and ``**`` arguments or ``None``. *defaults* is an *n*-tuple
+ 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
from kwonlyargs to defaults. *annotations* is a dictionary mapping argument
names to annotations.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list