summaryrefslogtreecommitdiff
path: root/Doc/library/inspect.rst
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-06-18 08:20:22 +0000
committerMartin Panter <vadmium+py@gmail.com>2016-06-18 08:20:22 +0000
commite7f4ede668029fb32a77d4092a2a723de499cdb4 (patch)
tree5f8536901406bb6767b24269c885d91f25b1ddf0 /Doc/library/inspect.rst
parent2eb11def8eb7dfd4f9a81db2115867abdfdaa287 (diff)
parent02b4dbb333f1afeed3d08399327b34c757184409 (diff)
downloadcpython-e7f4ede668029fb32a77d4092a2a723de499cdb4.tar.gz
Issue #24314: Merge doc links from 3.5
Diffstat (limited to 'Doc/library/inspect.rst')
-rw-r--r--Doc/library/inspect.rst35
1 files changed, 12 insertions, 23 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst
index 8e7ed19f29..5cb7c22adb 100644
--- a/Doc/library/inspect.rst
+++ b/Doc/library/inspect.rst
@@ -235,24 +235,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
@@ -266,8 +248,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)
@@ -646,6 +627,16 @@ function.
The name of the parameter as a string. The name must be a valid
Python identifier.
+ .. impl-detail::
+
+ CPython generates implicit parameter names of the form ``.0`` on the
+ code objects used to implement comprehensions and generator
+ expressions.
+
+ .. versionchanged:: 3.6
+ These parameter names are exposed by this module as names like
+ ``implicit0``.
+
.. attribute:: Parameter.default
The default value for the parameter. If the parameter has no default
@@ -854,8 +845,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
@@ -884,7 +873,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``).