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

Steve Holden sholden at holdenweb.com
Mon Mar 5 12:08:23 EST 2001


"Erik Max Francis" <max at alcyone.com> wrote in message
news:3AA3C82F.E2F6CA7F at alcyone.com...
> 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.
>
I'll take this as a "me, too", then! Of course if the prefix didn't end in
an inderscore it would be easier to type, but your arguments still apply.

so-that's-another-PEP-I-needn't-write-ly y'rs  - steve






More information about the Python-list mailing list