[issue21760] inspect documentation describes module type inaccurately
New submission from Eric Snow: In the documentation for the inspect module, the module type is described with just 2 of its potential 7 attributes. The language reference[2] and importlib docs[3] both provide an accurate list of module attributes. Furthermore, the description for __file__ should be fixed. It should be clear that __file__ reflects the location from which the module was loaded, that location is not necessarily a filename, and the attribute may not exist if the module was not loaded from a specific location (e.g. builtin and frozen modules). The same goes for __cached__ [1] https://docs.python.org/dev/library/inspect.html#types-and-members [2] https://docs.python.org/3/reference/import.html#import-related-module-attrib... [3] https://docs.python.org/3/library/importlib.html#importlib.machinery.ModuleS... ---------- assignee: docs@python components: Documentation messages: 220576 nosy: docs@python, eric.snow priority: normal severity: normal stage: needs patch status: open title: inspect documentation describes module type inaccurately versions: Python 3.4, Python 3.5 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21760> _______________________________________
Changes by Eric Snow <ericsnowcurrently@gmail.com>: ---------- nosy: +brett.cannon, ncoghlan _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21760> _______________________________________
Change by Brett Cannon <brett@python.org>: ---------- nosy: -brett.cannon _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue21760> _______________________________________
Change by Furkan Önder <furkanonder@protonmail.com>: ---------- keywords: +patch nosy: +furkanonder nosy_count: 3.0 -> 4.0 pull_requests: +18457 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/19097 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue21760> _______________________________________
Furkan Önder <furkanonder@protonmail.com> added the comment: I sent a PR to fix a __file__ description. https://github.com/python/cpython/pull/19097 ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue21760> _______________________________________
Furkan Onder <furkanonder@protonmail.com> added the comment: PR has been sent. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue21760> _______________________________________
participants (4)
-
Brett Cannon -
Eric Snow -
Furkan Onder -
Furkan Önder