Message108984
There seems to be a parser module bug for the except-as syntax in Python 2.7. After applying the attached patch (which adds a test to test_parser), and running test_parser, I get:
======================================================================
FAIL: test_try_stmt (__main__.RoundtripLegalSyntaxTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "Lib/test/test_parser.py", line 237, in test_try_stmt
self.check_suite("try: pass\nexcept A as e: pass\n")
File "Lib/test/test_parser.py", line 38, in check_suite
self.roundtrip(parser.suite, s)
File "Lib/test/test_parser.py", line 20, in roundtrip
self.fail("could not roundtrip %r: %s" % (s, why))
AssertionError: could not roundtrip 'try: pass\nexcept A as e: pass\n': Expected node type 12, got 1. |
|
Date |
User |
Action |
Args |
2010-06-30 14:36:34 | mark.dickinson | set | recipients:
+ mark.dickinson |
2010-06-30 14:36:34 | mark.dickinson | set | messageid: <1277908594.27.0.526273796473.issue9125@psf.upfronthosting.co.za> |
2010-06-30 14:36:31 | mark.dickinson | link | issue9125 messages |
2010-06-30 14:36:31 | mark.dickinson | create | |
|