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

Tim Peters at
Sat Mar 3 02:22:46 CET 2001

[Robin Becker]
> it's an ambitious act to suppose that the new complicated
> __twilight_zone__ rules are better than the old simpler rules because of
> some optimisation.

The official rule was that import* at other than module scope has undefined
behavior.  Still is.  The complication comes from spelling out the accidents
of the 2.1 implementation that intersect with the accidents of the 2.0
implementation, for the benefit of whatever users may have been violating the
rules without realizing it.

Would you prefer that we let you dope that out for yourself?  I'd be
delighted to stick to the official rule, not catering at *all* to code that
ignored the Ref Man.  Then we could replace the entire explanation with a
one-line quote from the manual:  "you cheated; you got caught; tough luck".

couldn't-be-simpler-than-that!-ly y'rs  - tim

More information about the Python-list mailing list