]> granicus.if.org Git - python/commitdiff
Mention that "defaults" can be None for inspect.getfullargspec.
authorLarry Hastings <larry@hastings.org>
Fri, 21 Sep 2012 16:40:41 +0000 (09:40 -0700)
committerLarry Hastings <larry@hastings.org>
Fri, 21 Sep 2012 16:40:41 +0000 (09:40 -0700)
Also minor formatting cleanups.

Doc/library/inspect.rst

index d1d2dea29bb5553938ae7bca687d23350caa0f95..4050ab3a149eb88422df364da1fd53cd61a0e84d 100644 (file)
@@ -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.