[Python-checkins] bpo-38918: Add __module__ entry for function & method type in inspect docs table (GH-17408)

Miss Islington (bot) webhook-mailer at python.org
Fri Dec 20 14:26:44 EST 2019


https://github.com/python/cpython/commit/44683bbc634bd007df572dce0d8bb348a469a6bb
commit: 44683bbc634bd007df572dce0d8bb348a469a6bb
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-12-20T11:26:39-08:00
summary:

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 at users.noreply.github.com>

files:
A Misc/NEWS.d/next/Documentation/2019-12-15-22-04-41.bpo-38918.8JnDTS.rst
M Doc/library/inspect.rst

diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst
index 10f347dd420f3..bab2c41e4e224 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 0000000000000..5747936dd64d5
--- /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>`_



More information about the Python-checkins mailing list