[New-bugs-announce] [issue21761] language reference describes the role of module.__file__ inaccurately
Eric Snow
report at bugs.python.org
Sat Jun 14 22:33:24 CEST 2014
New submission from Eric Snow:
The language reference [1] says:
Ultimately, the loader is what makes use of __file__ and/or __cached__
This implies that loaders should use __file__ and __cached__ when loading a module. Instead loaders are meant to implement exec_module() and use the spec that's passed in.
The entire section should have a clear note that loaders are not meant to rely a module's import-related attributes.
[1] https://docs.python.org/3/reference/import.html#__file__
[2] https://docs.python.org/3/reference/import.html#import-related-module-attributes
----------
messages: 220578
nosy: barry, brett.cannon, eric.snow, ncoghlan
priority: normal
severity: normal
status: open
title: language reference describes the role of module.__file__ inaccurately
versions: Python 3.4, Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21761>
_______________________________________
More information about the New-bugs-announce
mailing list