classification
Title: inspect documentation describes module type inaccurately
Type: Stage: needs patch
Components: Documentation Versions: Python 3.4, Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: brett.cannon, docs@python, eric.snow, ncoghlan
Priority: normal Keywords:

Created on 2014-06-14 19:58 by eric.snow, last changed 2014-06-14 20:16 by eric.snow.

Messages (1)
msg220576 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2014-06-14 19:58
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-attributes
[3] https://docs.python.org/3/library/importlib.html#importlib.machinery.ModuleSpec
History
Date User Action Args
2014-06-14 20:16:28eric.snowsetnosy: + brett.cannon, ncoghlan
2014-06-14 19:58:13eric.snowcreate