From 2e4cc7e0d84747826d3d2546d1bccd9c40a455c2 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Mon, 17 Sep 2001 19:33:48 +0000 Subject: 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 --- Lib/compiler/pycodegen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/compiler/pycodegen.py') diff --git a/Lib/compiler/pycodegen.py b/Lib/compiler/pycodegen.py index 04c115a7c3..7bc17958cf 100644 --- a/Lib/compiler/pycodegen.py +++ b/Lib/compiler/pycodegen.py @@ -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) -- cgit v1.2.1