]> granicus.if.org Git - python/commit
Fix SF bug #1167751, Argument genexp corner case
authorNeal Norwitz <nnorwitz@gmail.com>
Fri, 21 Oct 2005 06:24:02 +0000 (06:24 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Fri, 21 Oct 2005 06:24:02 +0000 (06:24 +0000)
commit37c0844b35b9a4d68f7ddf3a8b38d3e013f17d78
tree345859c3266fdc71bf64f076ed16507c2d3051de
parentc0d5faa9b4a763befbeab0159d2241a9ddf85b56
Fix SF bug #1167751, Argument genexp corner case

Incorrect code was generated for:

  foo(a = i for i in range(10))

This should have generated a SyntaxError.  Fix the Grammar so
it raises a SyntaxError and test it.

I'm uncertain whether this should be backported.  It makes
something that was Syntactically valid invalid.  However,
the code would either be completely broken or do the wrong thing.
Grammar/Grammar
Lib/test/test_genexps.py
Python/graminit.c