Re: PEP 420: Implicit Namespace Packages

Nick Coghlan <[email protected]>
Newsgroups gmane.comp.python.import
Message-ID <CADiSq7cKn+2O1MSzpyeswH3aCOymmwVEWEd_E1yLN2SwS7FpwA@mail.gmail.com>
On Sat, May 5, 2012 at 12:34 AM, Barry Warsaw <[email protected]> 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   |   [email protected]   |   Brisbane, Australia
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.