diff options
author | Collin Winter <collinw@gmail.com> | 2007-05-18 23:11:24 +0000 |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-05-18 23:11:24 +0000 |
commit | 6290305e6722c20e17d3c73bd6a30c6448bead83 (patch) | |
tree | fc3cc9d13179cb407116ebac000400c9c294140a /Lib/test/test_grammar.py | |
parent | 6eb7bede72f044b0b6a73551c04281defc7fc489 (diff) | |
download | cpython-git-6290305e6722c20e17d3c73bd6a30c6448bead83.tar.gz |
Backport PEP 3110's new 'except' syntax to 2.6.
Diffstat (limited to 'Lib/test/test_grammar.py')
-rw-r--r-- | Lib/test/test_grammar.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py index 14ce7e49a8..51d77f2ef5 100644 --- a/Lib/test/test_grammar.py +++ b/Lib/test/test_grammar.py @@ -600,7 +600,7 @@ hello world def testTry(self): ### try_stmt: 'try' ':' suite (except_clause ':' suite)+ ['else' ':' suite] ### | 'try' ':' suite 'finally' ':' suite - ### except_clause: 'except' [expr [',' expr]] + ### except_clause: 'except' [expr [('as' | ',') expr]] try: 1/0 except ZeroDivisionError: @@ -609,7 +609,7 @@ hello world pass try: 1/0 except EOFError: pass - except TypeError, msg: pass + except TypeError as msg: pass except RuntimeError, msg: pass except: pass else: pass |