[Python-Dev] Draft: PEP for imports

Guido van Rossum guido at python.org
Mon Jan 19 17:49:49 EST 2004


> I don't know if it's relevant to the discussion, but at various times people
> have asked about pushing the current global module/package namespace into a
> package, so instead of
> 
>     import sys
> 
> you might use
> 
>     import std.sys
> 
> or
> 
>     from std import sys
> 
> to reference the sys module as delivered with Python.
> 
> It might be worthwhile to consider that as an alternative or addition to
> this capability.  Because of all the code changes it would cause, it's not
> likely to be considered before Python 3, but it seems to me that it might
> solve many common module collision problems without resorting to major
> changes to the semantics of the import statement.

I strongly suggest to keep this out of Aahz' PEP; it's just going to
confuse the issue in the short run, and in the long run it's pretty
independent.  I also don't think that it's ever going to be that way.

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list