mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Last set of change to get regression tests to pass
Remove the only test in the syntax module. It ends up that the transformer must handle this error case. In the transformer, check for a list compression in com_assign_list() by looking for a list_for node where a comma is expected. In pycodegen.compile() re-raise the SyntaxError rather than catching it and exiting
This commit is contained in:
parent
c299fc16f2
commit
2e4cc7e0d8
6 changed files with 20 additions and 10 deletions
|
@ -49,7 +49,7 @@ def compile(filename, display=0):
|
|||
try:
|
||||
mod.compile(display)
|
||||
except SyntaxError, err:
|
||||
print "SyntaxError:", err
|
||||
raise
|
||||
else:
|
||||
f = open(filename + "c", "wb")
|
||||
mod.dump(f)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue