[issue44693] Unclear definition of the "__future__" module in Docs

Éric Araujo report at bugs.python.org
Fri Jul 23 16:08:21 EDT 2021


Éric Araujo <merwok at netwok.org> added the comment:

> it doesn't do a normal import of the `__future__.py` module, it is actually a compiler directive.

It’s both!  The compiler has special handling for this line (pseudo-module), and the interpreter does a regular import that gets the regular python module which can be used for introspection (the third purpose noted in the module doc).

----------
nosy: +eric.araujo

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44693>
_______________________________________


More information about the Python-bugs-list mailing list