Issue 19820: docs are missing info about module attributes (original) (raw)

Issue19820

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:54 admin set github: 64019
2019-08-21 12:23:23 michaelanckaert set keywords: + patchstage: needs patch -> patch reviewpull_requests: + <pull%5Frequest15071>
2019-08-14 19:00:03 michaelanckaert set messages: +
2019-08-14 17:55:12 eamanu set nosy: + eamanumessages: +
2019-08-14 17:10:14 eric.snow set messages: + versions: + Python 3.7, Python 3.8, Python 3.9, - Python 3.3, Python 3.4
2019-08-14 15:40:50 michaelanckaert set nosy: + michaelanckaertmessages: +
2019-07-14 17:39:24 anilbey set nosy: + anilbeymessages: +
2013-11-29 21:50:37 Arfrever set nosy: + Arfrever
2013-11-28 06:42:32 eric.snow set keywords: + easy
2013-11-28 06:42:21 eric.snow create