On Wed, Feb 19, 2014 at 3:56 AM, Paul Moore
On 18 February 2014 16:43, Chris Angelico
wrote: 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.
Hmm. Would that make anything any clearer? It feels like the sorts of crazy limitations that I've seen in some other languages, like how PHP up until relatively recently wouldn't let you subscript an array returned from a function without first assigning it to a variable:
Maybe not. Maybe again it's just a matter of a style recommendation. But the PEP itself has to tread a fine line between showing what is *possible* vs showing what is *intended* - I feel that the intention of the except construct should *not* be to do most of the crazy things people are talking about in this thread.
That's fair. It's tricky to show that this really would be an improvement to the language when it's showing very little, but tricky to show that it'd be an improvement when the expressions are horrendously obfuscated. I expect that this would be used mostly in really really simple ways. ChrisA