summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2012-09-21 16:40:41 (GMT)
committerLarry Hastings <larry@hastings.org>2012-09-21 16:40:41 (GMT)
commitdc07bac29efc1b8c9a2ae22a878e1b75bffc3f15 (patch)
treeb9eaeac862380abbd6996e3873d5620768235999
parent9471797cc634ed52c6fa7b35901f34c5595b0414 (diff)
downloadcpython-dc07bac29efc1b8c9a2ae22a878e1b75bffc3f15.zip
cpython-dc07bac29efc1b8c9a2ae22a878e1b75bffc3f15.tar.gz
cpython-dc07bac29efc1b8c9a2ae22a878e1b75bffc3f15.tar.bz2
Mention that "defaults" can be None for inspect.getfullargspec.
Also minor formatting cleanups.
-rw-r--r--Doc/library/inspect.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst
index 9b7ae9c..83b7702 100644
--- a/Doc/library/inspect.rst
+++ b/Doc/library/inspect.rst
@@ -675,9 +675,9 @@ Classes and functions
: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 @@ Classes and functions
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.