Index: Lib/test/test_parser.py =================================================================== --- Lib/test/test_parser.py (revision 82399) +++ Lib/test/test_parser.py (working copy) @@ -235,6 +235,12 @@ self.check_suite("try: pass\nexcept: pass\nelse: pass\n" "finally: pass\n") + def test_except_clause(self): + self.check_suite("try: pass\nexcept: pass\n") + self.check_suite("try: pass\nexcept A: pass\n") + self.check_suite("try: pass\nexcept A, e: pass\n") + self.check_suite("try: pass\nexcept A as e: pass\n") + def test_position(self): # An absolutely minimal test of position information. Better # tests would be a big project. Index: Modules/parsermodule.c =================================================================== --- Modules/parsermodule.c (revision 82399) +++ Modules/parsermodule.c (working copy) @@ -2126,10 +2126,13 @@ if (res && (nch > 1)) res = validate_test(CHILD(tree, 1)); - if (res && (nch == 4)) - res = (validate_comma(CHILD(tree, 2)) - && validate_test(CHILD(tree, 3))); - + if (res && (nch == 4)) { + if (TYPE(CHILD(tree, 2)) == NAME) + res = validate_name(CHILD(tree, 2), "as"); + else + res = validate_comma(CHILD(tree, 2)); + res = res && validate_test(CHILD(tree, 3)); + } return (res); }