the demise of 'from foo import * and its implications?

Erik Max Francis max at alcyone.com
Mon Mar 5 12:09:03 EST 2001


Steve Holden wrote:

> I did begin to wonder whether it might be possible to specify a name 
> prefix,
> along the lines of
>
>     from modulewithaverylongname import * prefix sh_
>
> to allow
>
>     sh_i
>
> as a reference to the module's "i", but I'm not sure that the gain is
> worth
> the pain. Even if such a proposal were to be PEP-ified and accepted it
> could
> not be mandated because that would break humongous amounts of existing
> code.
> 
> Thoughts?

I don't see how changing a . to an _ really helps anything, and all it
does is make the language more complex, and add a new keyword which is
_very_ likely to be used in existing code.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Even paranoids have real enemies.
\__/ Delmore Schwartz
    Crank Dot Net / http://www.crank.net/
 Cranks, crackpots, kooks, & loons on the Net.



More information about the Python-list mailing list