diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/inspect.rst | 18 | ||||
-rw-r--r-- | Doc/whatsnew/3.6.rst | 3 |
2 files changed, 18 insertions, 3 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index 8045d85..8e8d725 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -796,6 +796,24 @@ Classes and functions classes using multiple inheritance and their descendants will appear multiple times. + +.. function:: getargspec(func) + + Get the names and default values of a Python function's arguments. A + :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*. + + .. deprecated:: 3.0 + Use :func:`signature` and + :ref:`Signature Object <inspect-signature-object>`, which provide a + better introspecting API for callables. This function will be removed + in Python 3.6. + + .. function:: getfullargspec(func) Get the names and default values of a Python function's arguments. A diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst index bf5161d..f7dbbee 100644 --- a/Doc/whatsnew/3.6.rst +++ b/Doc/whatsnew/3.6.rst @@ -218,9 +218,6 @@ Removed API and Feature Removals ------------------------ -* ``inspect.getargspec()`` was removed (was deprecated since CPython 3.0). - :func:`inspect.getfullargspec` is an almost drop in replacement. - * ``inspect.getmoduleinfo()`` was removed (was deprecated since CPython 3.3). :func:`inspect.getmodulename` should be used for obtaining the module name for a given path. |