[issue19820] docs are missing info about module attributes

New submission from Eric Snow: 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. ---------- assignee: docs@python components: Documentation messages: 204642 nosy: docs@python, eric.snow priority: low severity: normal stage: needs patch status: open title: docs are missing info about module attributes type: enhancement versions: Python 3.3, Python 3.4 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue19820> _______________________________________

Changes by Eric Snow <ericsnowcurrently@gmail.com>: ---------- keywords: +easy _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue19820> _______________________________________

Changes by Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com>: ---------- nosy: +Arfrever _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue19820> _______________________________________

M. Anil Tuncel <tuncel.manil@gmail.com> added the comment: Are they still missing? inspect.ismodule() seems to be there at least. https://docs.python.org/3/library/inspect.html ---------- nosy: +anilbey _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue19820> _______________________________________

Michael Anckaert <michael.anckaert@sinax.be> added the comment: 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. ---------- nosy: +michaelanckaert _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue19820> _______________________________________

Eric Snow <ericsnowcurrently@gmail.com> added the comment: The relevant module attributes are described in the importlib docs: https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.load_m... ---------- versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.3, Python 3.4 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue19820> _______________________________________

Emmanuel Arias <emmanuelarias30@gmail.com> added the comment:
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. ---------- nosy: +eamanu _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue19820> _______________________________________

Michael Anckaert <michael.anckaert@sinax.be> added the comment: @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 ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue19820> _______________________________________

Change by Michael Anckaert <michael.anckaert@sinax.be>: ---------- keywords: +patch pull_requests: +15071 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15359 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue19820> _______________________________________
participants (5)
-
Arfrever Frehtes Taifersar Arahesis
-
Emmanuel Arias
-
Eric Snow
-
M. Anil Tuncel
-
Michael Anckaert