diff options
author | Guido van Rossum <guido@python.org> | 1992-03-31 18:54:11 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1992-03-31 18:54:11 (GMT) |
commit | 627efd94e97d9e7fadba7f863beca5993a91a274 (patch) | |
tree | b692b2867ac47a0acb80d6bddd52626b43ea95f8 | |
parent | 643d9326e4dbd22ba4916e25edd4c7b6da2f8e1f (diff) | |
download | cpython-627efd94e97d9e7fadba7f863beca5993a91a274.zip cpython-627efd94e97d9e7fadba7f863beca5993a91a274.tar.gz cpython-627efd94e97d9e7fadba7f863beca5993a91a274.tar.bz2 |
Some weird forms of try statements are no longer allowed.
-rw-r--r-- | Lib/test/test_grammar.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py index 3f1447f..9662439 100644 --- a/Lib/test/test_grammar.py +++ b/Lib/test/test_grammar.py @@ -193,9 +193,8 @@ for i, j, k in (): pass else: pass [3] -print 'try_stmt' # 'try' ':' suite (except_clause ':' suite)* ['finally' ':' suite] +print 'try_stmt' # 'try' ':' suite (except_clause ':' suite)+ | 'try' ':' suite 'finally' ':' suite ### except_clause: 'except' [expr [',' expr]] -try: pass try: 1/0 except ZeroDivisionError: pass try: 1/0 @@ -205,9 +204,6 @@ except RuntimeError, msg: pass except: pass try: pass finally: pass -try: 1/0 -except: pass -finally: pass print 'suite' # simple_stmt | NEWLINE INDENT NEWLINE* (stmt NEWLINE*)+ DEDENT if 1: pass |