[Python-Dev] accumulator display syntax
Guido van Rossum
guido at python.org
Tue Oct 21 16:50:16 EDT 2003
> Guido> I expect that most iterator comprehensions (we need a better
> Guido> term!)
>
> You didn't like "lazy list comprehensions"?
No, because list comprehensions are no longer the fundamental building
blocks. Generator expression sounds good to me now.
> Guido> We can quibble about whether double parentheses are needed, ...
>
> You haven't convinced me that you're not going to want to toss out
> one of the two comprehension syntaxes and only retain the lazy
> semantics in Py3k.
Too many double negatives. :-)
Right now I feel like keeping both syntaxes, but declaring list
comprehensions syntactic sugar for list(generator expression).
> If that's the case and the current list comprehension syntax is
> better than the current crop of proposals, why even add (lazy
> list|iterator) comprehensions now? Just make do without them until
> Py3k and make all list comprehensions lazy at that point. There
> will be enough other bullets to bite that this shouldn't be a big
> deal (many programs will probably require significant rewriting
> anyway).
It's likely that generator experssions won't make it into Python 2.x
for any x, just because of the effort to get the community to accept
new syntax in general.
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev
mailing list