[Python-Dev] accumulator display syntax

"Martin v. Löwis" martin at v.loewis.de
Mon Oct 20 01:52:33 EDT 2003

Greg Ewing wrote:

> How about just leaving off the brackets?
>   gen = yield x*x for x in stuff

I think this has a dangling else problem:

gen = yield x*x for x in yield y+y for y in stuff if x > y

In this expression, how would you put parentheses, and why?


More information about the Python-Dev mailing list