summaryrefslogtreecommitdiffstats
path: root/Doc/library/inspect.rst
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2016-01-11 20:15:01 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2016-01-11 20:15:01 (GMT)
commit37dc2b28834c95d24746c2958e9ea31d3e8d1968 (patch)
tree86745aeede3b7ebc00dbde82ffb0cc8d8ffae2dc /Doc/library/inspect.rst
parentec71f1779fc4d3509e8f16197a99a6ed3706a591 (diff)
downloadcpython-37dc2b28834c95d24746c2958e9ea31d3e8d1968.zip
cpython-37dc2b28834c95d24746c2958e9ea31d3e8d1968.tar.gz
cpython-37dc2b28834c95d24746c2958e9ea31d3e8d1968.tar.bz2
Issue #25486: Resurrect inspect.getargspec in 3.6. Backout a565aad5d6e1.
The decision is that we shouldn't remove popular APIs (however long they are depreacted) from Python 3, while 2.7 is still around and supported.
Diffstat (limited to 'Doc/library/inspect.rst')
-rw-r--r--Doc/library/inspect.rst18
1 files changed, 18 insertions, 0 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