This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: docs are missing info about module attributes
Type: enhancement Stage: patch review
Components: Documentation Versions: Python 3.9, Python 3.8, Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Arfrever, anilbey, docs@python, eamanu, eric.snow, michaelanckaert
Priority: low Keywords: easy, patch

Created on 2013-11-28 06:42 by eric.snow, last changed 2022-04-11 14:57 by admin.

Pull Requests
URL Status Linked Edit
PR 15359 open michaelanckaert, 2019-08-21 12:23
Messages (6)
msg204642 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2013-11-28 06:42
The docs for the inspect module and the types module do not list all the import-related module attributes.  I'm guessing they've been out of sync a while.

The docstring for for inspect.ismodule() is likewise missing information.
msg347930 - (view) Author: M. Anil Tuncel (anilbey) * Date: 2019-07-14 17:39
Are they still missing? inspect.ismodule() seems to be there at least.
https://docs.python.org/3/library/inspect.html
msg349712 - (view) Author: Michael Anckaert (michaelanckaert) * Date: 2019-08-14 15:40
As far as I can tell there is at least some information missing from the 'Types and members' section. Not all attributes are listed in the table. 

For example the attribute __cached__ is missing from the module type but it is documented in the inspect module. 

I can update the docs but I would rely on the comments in Lib/inspect.py on what to include. Executing inspect.getmembers on a module returns a lot more attributes than documented in ismodule.
msg349718 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2019-08-14 17:10
The relevant module attributes are described in the importlib docs: https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.load_module
msg349727 - (view) Author: Emmanuel Arias (eamanu) * Date: 2019-08-14 17:55
> I can update the docs but I would rely on the comments in Lib/inspect.py on what to include. Executing inspect.getmembers on a module returns a lot more attributes than documented in ismodule.

I can help too.
msg349735 - (view) Author: Michael Anckaert (michaelanckaert) * Date: 2019-08-14 19:00
@emmanuel: thanks for offering your help. 

I made a first attempt at improving the docs in this branch: https://github.com/MichaelAnckaert/cpython/tree/bpo-19820
History
Date User Action Args
2022-04-11 14:57:54adminsetgithub: 64019
2019-08-21 12:23:23michaelanckaertsetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request15071
2019-08-14 19:00:03michaelanckaertsetmessages: + msg349735
2019-08-14 17:55:12eamanusetnosy: + eamanu
messages: + msg349727
2019-08-14 17:10:14eric.snowsetmessages: + msg349718
versions: + Python 3.7, Python 3.8, Python 3.9, - Python 3.3, Python 3.4
2019-08-14 15:40:50michaelanckaertsetnosy: + michaelanckaert
messages: + msg349712
2019-07-14 17:39:24anilbeysetnosy: + anilbey
messages: + msg347930
2013-11-29 21:50:37Arfreversetnosy: + Arfrever
2013-11-28 06:42:32eric.snowsetkeywords: + easy
2013-11-28 06:42:21eric.snowcreate