[Python-ideas] except expression

Rob Cliffe rob.cliffe at btinternet.com
Tue Feb 18 19:34:57 CET 2014


On 18/02/2014 16:56, Paul Moore wrote:
> On 18 February 2014 16:43, Chris Angelico <rosuav at gmail.com> 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.
Almost any language feature can be abused.  That doesn't mean we should 
regulate their use.
Rob Cliffe
>
> Paul
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.2247 / Virus Database: 3705/6602 - Release Date: 02/17/14
>
>



More information about the Python-ideas mailing list