[Python-Dev] PEP 289 - Generator Expressions - Let's Move Forward

Guido van Rossum guido at python.org
Fri Apr 23 14:26:58 EDT 2004

I'd like to get generator expressions checked into CVS.

Regarding the early-or-late binding issue, here's what I'd like to see
happen: I'd like the late-binding (i.e. non-capture) version checked
in and released with Python 2.4a1 and a2.  If we find there are real
problems with these semantics, we can switch to early-binding
semantics in 2.4b1; this would be almost completely backwards
compatible.  But if it works in the alpha release, we'll stick with
late binding.

My reasons for (still!) preferring late binding are:

(a) I find it hard to defend automatic variable capture given Python's
    general late-binding semantics

(b) I believe that use cases needing early binding are uncommon and
    strained: they all involve creating a list of generator
    expressions, which IMO is a pretty unusual thing to do

I cannot volunteer to do the final code review and checkin, and I
believe Raymond is still on vacation (he's asked me to relieve him
from the responsibility of shepherding this patch) so we need someone
to volunteer.

The patch is here:


--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-Dev mailing list