[Python-Dev] Iteration variables and list comprehensions

Greg Ewing greg@cosc.canterbury.ac.nz
Thu, 31 May 2001 17:16:41 +1200 (NZST)


Tim:

> Needs a PEP, and possibly
> even an associated future-statement.  Overall, I'm more in favor of changing
> it than not.

If we do this, we also need to consider whether we want
to make the corresponding change to regular for-loops.
Seems to me that all the reasons it's a good idea for
listcomps apply to for-loops as well.

Another advantage of changing both together is that
we can continue to describe listcomp semantics in terms
of for-loops instead of lambdas. Then we won't have to go 
into hiding until Guido dies or lifts the fatwah against
us.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg@cosc.canterbury.ac.nz	   +--------------------------------------+