Some weird forms of try statements are no longer allowed.
This commit is contained in:
parent
643d9326e4
commit
627efd94e9
@ -193,9 +193,8 @@ for i, j, k in (): pass
|
|||||||
else: pass
|
else: pass
|
||||||
[3]
|
[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]]
|
### except_clause: 'except' [expr [',' expr]]
|
||||||
try: pass
|
|
||||||
try: 1/0
|
try: 1/0
|
||||||
except ZeroDivisionError: pass
|
except ZeroDivisionError: pass
|
||||||
try: 1/0
|
try: 1/0
|
||||||
@ -205,9 +204,6 @@ except RuntimeError, msg: pass
|
|||||||
except: pass
|
except: pass
|
||||||
try: pass
|
try: pass
|
||||||
finally: pass
|
finally: pass
|
||||||
try: 1/0
|
|
||||||
except: pass
|
|
||||||
finally: pass
|
|
||||||
|
|
||||||
print 'suite' # simple_stmt | NEWLINE INDENT NEWLINE* (stmt NEWLINE*)+ DEDENT
|
print 'suite' # simple_stmt | NEWLINE INDENT NEWLINE* (stmt NEWLINE*)+ DEDENT
|
||||||
if 1: pass
|
if 1: pass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user