PEP 328 update

Carl Banks imbosol at aerojockey.invalid
Wed May 5 00:20:57 EDT 2004


Greg Ewing wrote:
> Carl Banks wrote:
>> you can see why "import .ghi" is not clear.  OTOH, "from .
>> import ghi" is totally clear and unambiguous.
> 
> But surely "import .ghi as jkl" is just as clear and
> unambiguous? Why shouldn't *that* be allowed?

Insofar as it corresponds to the way absolute imports work, I don't
really have a problem with it.  It's still redundant ("from . import
fhi as jkl" does the same thing), but I'm more bothered by unclarity.

I'm not so sure the corresponding absolute import is right though,
although it's definitely intuitive.  Hell, I'm not so sure "import
abc.def.ghi" binding "abc" is right.


-- 
CARL BANKS                      http://www.aerojockey.com/software
"If you believe in yourself, drink your school, stay on drugs, and
don't do milk, you can get work." 
          -- Parody of Mr. T from a Robert Smigel Cartoon



More information about the Python-list mailing list