Re: PEP 420: Implicit Namespace Packages

Paul Moore <[email protected]>
Newsgroups gmane.comp.python.import
Message-ID <CACac1F-cpkTedW4uNHiGLD0LDq7Ys-ZXT1Gc1fDejQKx012R+Q@mail.gmail.com>
On 4 May 2012 16:14, Nick Coghlan <[email protected]> wrote:
> 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.

That would be a *very* good idea. Whether PEP 420 should be held
hostage to this, I don't know, but I think it should be targeted as a
key item for 3.3. Just having a reference to what the language
actually guarantees would be immensely useful. I did actually try to
do this once, but my head exploded :-) (I'd be willing to help out
with it, but I don't know where it would fit in the docs - could
anyone suggest a basic location and structure, and I could try to
write some words to go into it?)

On a somewhat related note, does anyone know how well oddities like
jython's ability to import Java classes (and IronPython for .Net
classes) fit any such rules?

Paul.
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.