summaryrefslogtreecommitdiffstats
path: root/Doc/library/inspect.rst
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2016-06-04 21:40:03 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2016-06-04 21:40:03 (GMT)
commitb4b966ece26b4fc14c94fa9bccd831d5d5c93aab (patch)
treec9c4ef12406580a4bd91ca071be4125bf4855e2a /Doc/library/inspect.rst
parentd62548afede899e71e59a2a0b31f19fdf031c560 (diff)
downloadcpython-b4b966ece26b4fc14c94fa9bccd831d5d5c93aab.zip
cpython-b4b966ece26b4fc14c94fa9bccd831d5d5c93aab.tar.gz
cpython-b4b966ece26b4fc14c94fa9bccd831d5d5c93aab.tar.bz2
Issue #19611: handle implicit parameters in inspect.signature
inspect.signature now reports the implicit ``.0`` parameters generated by the compiler for comprehension and generator expression scopes as if they were positional-only parameters called ``implicit0``. Patch by Jelle Zijlstra.
Diffstat (limited to 'Doc/library/inspect.rst')
-rw-r--r--Doc/library/inspect.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst
index 3994850..3b36379 100644
--- a/Doc/library/inspect.rst
+++ b/Doc/library/inspect.rst
@@ -625,6 +625,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