summaryrefslogtreecommitdiff
path: root/Doc/library/inspect.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/inspect.rst')
-rw-r--r--Doc/library/inspect.rst43
1 files changed, 2 insertions, 41 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst
index 23e559cabc..8045d85a08 100644
--- a/Doc/library/inspect.rst
+++ b/Doc/library/inspect.rst
@@ -234,24 +234,6 @@ attributes:
listed in the metaclass' custom :meth:`__dir__`.
-.. function:: getmoduleinfo(path)
-
- Returns a :term:`named tuple` ``ModuleInfo(name, suffix, mode, module_type)``
- of values that describe how Python will interpret the file identified by
- *path* if it is a module, or ``None`` if it would not be identified as a
- module. In that tuple, *name* is the name of the module without the name of
- any enclosing package, *suffix* is the trailing part of the file name (which
- may not be a dot-delimited extension), *mode* is the :func:`open` mode that
- would be used (``'r'`` or ``'rb'``), and *module_type* is an integer giving
- the type of the module. *module_type* will have a value which can be
- compared to the constants defined in the :mod:`imp` module; see the
- documentation for that module for more information on module types.
-
- .. deprecated:: 3.3
- You may check the file path's suffix against the supported suffixes
- listed in :mod:`importlib.machinery` to infer the same information.
-
-
.. function:: getmodulename(path)
Return the name of the module named by the file *path*, without including the
@@ -265,8 +247,7 @@ attributes:
still return ``None``.
.. versionchanged:: 3.3
- This function is now based directly on :mod:`importlib` rather than the
- deprecated :func:`getmoduleinfo`.
+ The function is based directly on :mod:`importlib`.
.. function:: ismodule(object)
@@ -815,24 +796,6 @@ 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
@@ -849,8 +812,6 @@ Classes and functions
from kwonlyargs to defaults. *annotations* is a dictionary mapping argument
names to annotations.
- The first four items in the tuple correspond to :func:`getargspec`.
-
.. versionchanged:: 3.4
This function is now based on :func:`signature`, but still ignores
``__wrapped__`` attributes and includes the already bound first
@@ -879,7 +840,7 @@ Classes and functions
.. function:: formatargspec(args[, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations[, formatarg, formatvarargs, formatvarkw, formatvalue, formatreturns, formatannotations]])
Format a pretty argument spec from the values returned by
- :func:`getargspec` or :func:`getfullargspec`.
+ :func:`getfullargspec`.
The first seven arguments are (``args``, ``varargs``, ``varkw``,
``defaults``, ``kwonlyargs``, ``kwonlydefaults``, ``annotations``).