PEP 328: Imports: Multi-Line and Absolute/Relative

Sean Ross sross at connectmail.carleton.ca
Tue Mar 9 13:13:49 EST 2004


"Josiah Carlson" <jcarlson at nospam.uci.edu> wrote in message
news:c2jon0$gba$1 at news.service.uci.edu...
[snip]
> Or for backwards compatibility:
> from HOW.MODULE import NAMES as RENAME
> import HOW.MODULE.NAMES as RENAME
>
>
> Where HOW is of the form:
> -<INTEGER>[.PACKAGE1[.PACKAGE2[...]]]
> [PACKAGE1[.PACKAGE2[...]]]
>
> With the search stepping up <integer> path levels, then traversing down
> through the listed packages, not stepping up any path levels when the
> -integer is not given, and raising a SyntaxError for -0 imports.  For
[snip]
> I think such behavior is clear enough magical syntax, what do others
think?


+1

I like this version the best, so far. It should be added to the PEP.

Sean





More information about the Python-list mailing list