[Python-ideas] except expression

Rob Cliffe rob.cliffe at btinternet.com
Thu Feb 20 14:38:04 CET 2014


On 20/02/2014 01:18, Chris Angelico wrote:
> On Thu, Feb 20, 2014 at 11:15 AM, Ethan Furman <ethan at stoneleaf.us> wrote:
>> result = 1/x except ZeroDivisionError -> NaN
>>
>> For the record, I could just as easily live with the colon instead of the
>> arrow.
>>
> Time to open up this branch of the discussion... colon or arrow?
Colon, please.  More compact, reads naturally as it's part of the 
English language, consistent with "except" statements.
Rob Cliffe.


More information about the Python-ideas mailing list