[Python-Dev] Draft: PEP for imports

Skip Montanaro skip at pobox.com
Mon Jan 19 17:34:58 EST 2004


    aahz> Here's the draft PEP for imports.  I'll wait a few days for
    aahz> comments before sending to the PEPmeister.

I don't know if it's relevant to the discussion, but at various times people
have asked about pushing the current global module/package namespace into a
package, so instead of

    import sys

you might use

    import std.sys

or

    from std import sys

to reference the sys module as delivered with Python.

It might be worthwhile to consider that as an alternative or addition to
this capability.  Because of all the code changes it would cause, it's not
likely to be considered before Python 3, but it seems to me that it might
solve many common module collision problems without resorting to major
changes to the semantics of the import statement.

Skip



More information about the Python-Dev mailing list