[Python-Dev] Re: Christmas Wishlist

Guido van Rossum guido at python.org
Mon Dec 15 13:42:00 EST 2003


> I don't understand the desire to totally prevent relative imports.

It's because of TOOWTDI.

> It would be quite useful in avoiding growing module-naming problems,
> where you have to be careful about shadowing a global module with
> one in your package.

I don't see the problem, or I misuderstand what "it" refers to; it
seems you have this backwards if it refers to relative imports.  Say
my package P defines a submodule sys.  If we require absolute imports,
there is no ambiguity: the submodule sys must be imported as P.sys
while the standard sys module can be imported as simply sys.

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



More information about the Python-Dev mailing list