[Python-Dev] Re: Multi-line import implementation (was: 2.4a2, and @decorators) (original) (raw)

Fredrik Lundh fredrik at pythonware.com
Mon Aug 9 17:11:45 CEST 2004


Dima Dorfman wrote:

I took a stab at implementing this (the easy part of PEP 328--parens around import lists). Are the exact semantics of what's allowed documented somewhere?

I think this syntax was originally proposed here:

http://mail.python.org/pipermail/python-dev/2003-December/041072.html

which mentions that since "a, b = c" is already equivalent to "(a, b) = c", so " in mind, I'd hand out the following scores (0=don't really care):

import (os, sys)

+0

from sys import (stdin, stdout, stderr)

+1

import (os)

+0

from sys import (*)

-0

from (sys) import stdin

-0

import (os), (sys)

-1

import (os,)

-1



More information about the Python-Dev mailing list