0
It's a syntax constraint. And it was coded this way. When they wrote the Python interpreter and declared the grammar they did in that way. Check it here: https://docs.python.org/3/reference/grammar.html try_stmt: ('try' ':' suite ((except_clause ':' suite)+ ['else' ':' suite] ['finally' ':' suite] | 'finally' ':' suite)) So it opens with try and requires 1 or more except clauses. Optionally you can have else and finally. Between these last, the order doesn't matter
9th Mar 2019, 1:10 AM
Mauricio Martins
Mauricio Martins - avatar