[Python-ideas] except expression

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Feb 21 04:50:34 CET 2014


Chris Angelico wrote:

> things[i] except None if IndexError if issubclass(things, list) else KeyError

That should probably be illegal without parens too:

    things[i] except None if (IndexError if issubclass(things, list) else KeyError)

-- 
Greg


More information about the Python-ideas mailing list