[Import-SIG] PEP 420: Implicit Namespace Packages
Nick Coghlan
ncoghlan at gmail.com
Fri May 4 17:14:13 CEST 2012
On Sat, May 5, 2012 at 12:34 AM, Barry Warsaw <barry at python.org> wrote:
> * Explicitly leave the assignment of __file__ to the loader.
> * Allow loaders to not set __file__
> * Add an optional API to loaders, module_repr() as defined above.
I can accept that approach on one condition: the PEP 420
implementation comes with the long-overdue migration of the definition
of the import system semantics into the language reference.
The main sticking point preventing that in the past has been that
nobody wanted to document all the caveats and special cases needed to
accurately describe CPython's behaviour. For 3.3+, no such caveats are
necessary, since Brett's importlib efforts mean that even the default
import system follows the rules.
The proposed update will require changes to the description of the
import semantics, anyway, so rather than making those changes directly
in PEP 302, it would be better to document them in the language
reference and update PEP 302 with a note to say that, for 3.3+, it is
no longer the authoritative source.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Import-SIG
mailing list