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

Guido van Rossum guido at python.org
Tue May 4 19:44:53 EDT 2004


> Alas, the PEP is indeed out of date, and I can't remember exactly
> which set of gimmicks Guido favored.  The PEP currently says
> early-binding is the rule, but I *think* Guido favored mostly-late
> binding -- which is late binding, except that the iterable in the
> leftmost for-clause is evaluated at once.  So
> 
>     ... (e1 for stuff in e2 for morestuff in e3 ...) ...
> 
> is effectively replaced by
> 
>     def __g(primary):
>         for stuff in primary:
>            for morestuff in e3:
>               ...
>                  yield e1
> 
>     ... __g(e2) ...

Exactly.

> > I'm not fussed if we slip a week or two here, but if
> > it slips another 6 weeks, say, then the release time
> > line could be in some trouble.
> 
> Is anyone working (or willing to work) on the PEP, implementation,
> and docs now?  I can't make time for it, but if I could I think the
> semantic issues are settled (in Guido's mind, and possibly in some
> email of his I can't find now).

How about this one. :-)

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



More information about the Python-Dev mailing list