List comprehensions

Greg Ewing greg.ewing at compaq.com
Mon Dec 20 05:26:37 EST 1999


skaller wrote:
> 
> What is the proposed syntax for list comprehensions?

The one my patch currently implements is:

   list_comprehension :== '[' expr iterator... ']'
   iterator :== 'for' target 'in' expr | 'if' expr

> But the idea of the syntax is to reduce the need for
> functional syntax.

Indeed.

Greg



More information about the Python-list mailing list