]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-38918: Add __module__ entry for function & method type in inspect docs table...
authorParth Sharma <parthsharma2@users.noreply.github.com>
Fri, 20 Dec 2019 19:18:33 +0000 (00:48 +0530)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 20 Dec 2019 19:18:33 +0000 (11:18 -0800)
Adds` __module__ ` entries for function & method types in inspect docs table.

https://bugs.python.org/issue38918

Doc/library/inspect.rst
Misc/NEWS.d/next/Documentation/2019-12-15-22-04-41.bpo-38918.8JnDTS.rst [new file with mode: 0644]

index 10f347dd420f314f04411876efc8a3927c54e18e..bab2c41e4e2242a24ac9544eb08a320dc8af9648 100644 (file)
@@ -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 (file)
index 0000000..5747936
--- /dev/null
@@ -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>`_