Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14f43cf commit af82141Copy full SHA for af82141
1 file changed
Grammar/Grammar
@@ -92,7 +92,8 @@ compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef
92
if_stmt: 'if' test ':' suite ('elif' test ':' suite)* ['else' ':' suite]
93
while_stmt: 'while' test ':' suite ['else' ':' suite]
94
for_stmt: 'for' exprlist 'in' testlist ':' suite ['else' ':' suite]
95
-try_stmt: 'try' ':' suite (except_clause ':' suite)* ['finally' ':' suite]
+try_stmt: 'try' ':' suite (except_clause ':' suite)+ | 'try' ':' suite 'finally' ':' suite
96
+# NB compile.c makes sure that the default except clause is last
97
except_clause: 'except' [test [',' test]]
98
suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT
99
0 commit comments