19 Feb
2014
19 Feb
'14
12:19 a.m.
18.02.2014 17:25, Paul Moore napisaĆ:
OTOH, there's still an argument for only allowing a single exception name in the syntax (an "identifier" rather than an "expression" in syntax terms). If you must catch multiple exceptions, give the relevant tuple a name.
I believe that at this point (what the exception spec would be allowed to be: identifier?, tuple?, any expression?) the syntax should be identical to the statement syntax (i.e.: any expression). Less special cases to remember. For the same reason, I believe that tuple expressions ("except (ValueError, TypeError)") should be obligatorily enclosed with parens as long as they are obligatorily enclosed with parens in the statement syntax (i.e., probably till Python 3.13 :)). *j