diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2005-12-17 21:33:47 +0000 |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2005-12-17 21:33:47 +0000 |
commit | 4ff271b0d041929f1dbddd94d8abf946d584ad3a (patch) | |
tree | fd93e436096843c9c12a63083509c1c67a061909 /Grammar | |
parent | 901170b4010eb1580d959b06d206e3fb7243995d (diff) | |
download | cpython-4ff271b0d041929f1dbddd94d8abf946d584ad3a.tar.gz |
SF patch #1355913, PEP 341 - Unification of try/except and try/finally
Modified since ast-arenas was implemented.
Diffstat (limited to 'Grammar')
-rw-r--r-- | Grammar/Grammar | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Grammar/Grammar b/Grammar/Grammar index d8106e9719..0239413dae 100644 --- a/Grammar/Grammar +++ b/Grammar/Grammar @@ -67,8 +67,7 @@ compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef if_stmt: 'if' test ':' suite ('elif' test ':' suite)* ['else' ':' suite] while_stmt: 'while' test ':' suite ['else' ':' suite] for_stmt: 'for' exprlist 'in' testlist ':' suite ['else' ':' suite] -try_stmt: ('try' ':' suite (except_clause ':' suite)+ #diagram:break - ['else' ':' suite] | 'try' ':' suite 'finally' ':' suite) +try_stmt: 'try' ':' suite ((except_clause ':' suite)+ ['else' ':' suite] ['finally' ':' suite] | 'finally' ':' suite) # NB compile.c makes sure that the default except clause is last except_clause: 'except' [test [',' test]] suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT |