Public imports

skip at skip at
Mon Dec 8 19:57:10 CET 2008

    Márcio> So, no chance of doing this:
    Márcio> # ""
    Márcio> from __future__ import division, with_statement

    Márcio> # ""
    Márcio> from A import *
    Márcio> print 1 / 2

    Márcio> ...and printing 0.5, right? Too bad :)

"from __future__ ..." isn't really an import statement in the usual sense of
the term.  It affects the byte code compiler immediately and I believe only
when using that syntax.  That it actually adds a name to the module's
namespace is not really used (at least, not often).

Skip Montanaro - skip at -

More information about the Python-list mailing list