[Python-ideas] except expression
Chris Angelico
rosuav at gmail.com
Thu Feb 13 23:24:54 CET 2014
On Fri, Feb 14, 2014 at 9:22 AM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Chris Angelico wrote:
>>
>> phone = "Unknown" if except KeyError else addressbook[name]
>
>
> -42. My brain gets totally derailed when it hits "if except";
> it parses that bit as a syntax error.
Yeah, and it reads backwards anyway. I don't particularly like that syntax.
ChrisA
More information about the Python-ideas
mailing list