[Python-Dev] problem with genexp (original) (raw)

Neal Norwitz nnorwitz at gmail.com
Sat Feb 25 00:11:26 CET 2006


On 2/20/06, Jiwon Seo <seojiwon at gmail.com> wrote:

Regarding this Grammar change; (last October) from argument: [test '=' ] test [genfor] to argument: test [genfor] | test '=' test ['(' genfor ')']

- to raise error for "bar(a = i for i in range(10)) )" I think we should change it to argument: test [genfor] | test '=' test instead of argument: test [genfor] | test '=' test ['(' genfor ')'] that is, without ['(' genfor ')'] . We don't need that extra term, because "test" itself includes generator expressions - with all those parensises.

Works for me, committed.

n



More information about the Python-Dev mailing list