summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-12-20 11:26:16 -0800
committerGitHub <noreply@github.com>2019-12-20 11:26:16 -0800
commit0ffc90031cadf5637cfc13a40899e71c259c49b1 (patch)
treecb3c614b1b34aba4f8453f3657b789c2f214f271
parent917419f58b2869d71691c5ba54a9e02e5dcf73b2 (diff)
downloadcpython-git-0ffc90031cadf5637cfc13a40899e71c259c49b1.tar.gz
bpo-38918: Add __module__ entry for function & method type in inspect docs table (GH-17408)
Adds` __module__ ` entries for function & method types in inspect docs table. https://bugs.python.org/issue38918 (cherry picked from commit f522a6ddb67a238bab5673608111f74ec4e22205) Co-authored-by: Parth Sharma <parthsharma2@users.noreply.github.com>
-rw-r--r--Doc/library/inspect.rst6
-rw-r--r--Misc/NEWS.d/next/Documentation/2019-12-15-22-04-41.bpo-38918.8JnDTS.rst3
2 files changed, 9 insertions, 0 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst
index d52726d07a..02b02cae9d 100644
--- a/Doc/library/inspect.rst
+++ b/Doc/library/inspect.rst
@@ -70,6 +70,9 @@ attributes:
| | | method is bound, or |
| | | ``None`` |
+-----------+-------------------+---------------------------+
+| | __module__ | name of module in which |
+| | | this method was defined |
++-----------+-------------------+---------------------------+
| function | __doc__ | documentation string |
+-----------+-------------------+---------------------------+
| | __name__ | name with which this |
@@ -98,6 +101,9 @@ attributes:
| | | reserved for return |
| | | annotations. |
+-----------+-------------------+---------------------------+
+| | __module__ | name of module in which |
+| | | this function was defined |
++-----------+-------------------+---------------------------+
| traceback | tb_frame | frame object at this |
| | | level |
+-----------+-------------------+---------------------------+
diff --git a/Misc/NEWS.d/next/Documentation/2019-12-15-22-04-41.bpo-38918.8JnDTS.rst b/Misc/NEWS.d/next/Documentation/2019-12-15-22-04-41.bpo-38918.8JnDTS.rst
new file mode 100644
index 0000000000..5747936dd6
--- /dev/null
+++ b/Misc/NEWS.d/next/Documentation/2019-12-15-22-04-41.bpo-38918.8JnDTS.rst
@@ -0,0 +1,3 @@
+Add an entry for ``__module__`` in the "function" & "method" sections of the
+`inspect docs types and members table
+<https://docs.python.org/3/library/inspect.html#types-and-members>`_