[Python-Dev] Features for Python 2.0
Guido van Rossum
Tue, 25 Jul 2000 09:57:35 -0500
> guido wrote:
> > [x for x in seq]
> > [x+y for x in seq1 for y in seq2]
> > [x for x in seq if pred(x)]
> > [x, x*2 for x in seq]
> stupid question: does the last one mean that a python parser has
> to stack an infinite number of tokens before it can figure out if it
> has a list or a list comprehension?
> did Python just turn into something that is much harder to parse?
This is a (minor) open issue; I'd be happy with requiring
[(x, x*2) for x in seq]
--Guido van Rossum (home page: http://dinsdale.python.org/~guido/)