classification
Title: Add __module__ entry for function type in inspect docs table.
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.9, Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, eric.snow, miss-islington, parthsharma2
Priority: normal Keywords: easy, newcomer friendly, patch

Created on 2019-11-26 15:27 by eric.snow, last changed 2019-12-20 19:29 by eric.snow. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 17408 merged python-dev, 2019-11-27 17:00
PR 17675 merged miss-islington, 2019-12-20 19:20
PR 17676 merged miss-islington, 2019-12-20 19:21
Messages (6)
msg357502 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2019-11-26 15:27
The docs page for the inspect module has a large table describing the special attributes of various important types.  One entry for function attributes is missing: __module__.  It should be added.

Note that __module__ *is* included in the function attributes listed in the language reference. [2]

The same goes for the "method" (really "instance method") section of the table: it should also have __module__. [3]


[1] https://docs.python.org/3/library/inspect.html#types-and-members
[2] https://docs.python.org/3/reference/datamodel.html#index-34
[3] https://docs.python.org/3/reference/datamodel.html#index-36
msg357752 - (view) Author: Parth Sharma (parthsharma2) * Date: 2019-12-03 13:08
Hey Eric,

I made a PR [1] which adds an entry for __module__ in the "function" and "method" sections of the table [2]. Can you review it and let me know if any changes are required?

[1] https://github.com/python/cpython/pull/17408
[2] https://docs.python.org/3/library/inspect.html#types-and-members
msg358730 - (view) Author: miss-islington (miss-islington) Date: 2019-12-20 19:18
New changeset f522a6ddb67a238bab5673608111f74ec4e22205 by Miss Islington (bot) (Parth Sharma) in branch 'master':
bpo-38918: Add __module__ entry for function & method type in inspect docs table (GH-17408)
https://github.com/python/cpython/commit/f522a6ddb67a238bab5673608111f74ec4e22205
msg358732 - (view) Author: miss-islington (miss-islington) Date: 2019-12-20 19:26
New changeset 0ffc90031cadf5637cfc13a40899e71c259c49b1 by Miss Islington (bot) in branch '3.7':
bpo-38918: Add __module__ entry for function & method type in inspect docs table (GH-17408)
https://github.com/python/cpython/commit/0ffc90031cadf5637cfc13a40899e71c259c49b1
msg358733 - (view) Author: miss-islington (miss-islington) Date: 2019-12-20 19:26
New changeset 44683bbc634bd007df572dce0d8bb348a469a6bb by Miss Islington (bot) in branch '3.8':
bpo-38918: Add __module__ entry for function & method type in inspect docs table (GH-17408)
https://github.com/python/cpython/commit/44683bbc634bd007df572dce0d8bb348a469a6bb
msg358734 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2019-12-20 19:29
Thanks for working on this, @parthsharma2!
History
Date User Action Args
2019-12-20 19:29:09eric.snowsetstatus: open -> closed
resolution: fixed
messages: + msg358734

stage: patch review -> resolved
2019-12-20 19:26:43miss-islingtonsetmessages: + msg358733
2019-12-20 19:26:20miss-islingtonsetmessages: + msg358732
2019-12-20 19:21:00miss-islingtonsetpull_requests: + pull_request17136
2019-12-20 19:20:53miss-islingtonsetpull_requests: + pull_request17135
2019-12-20 19:18:41miss-islingtonsetnosy: + miss-islington
messages: + msg358730
2019-12-03 13:08:58parthsharma2setnosy: + parthsharma2
messages: + msg357752
2019-11-27 17:00:38python-devsetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request16888
2019-11-26 15:27:12eric.snowcreate