PEP308 - preference for 'x if c else y' over 'c then x else y'

Andrew Koenig ark at research.att.com
Tue Feb 18 10:29:16 EST 2003


jcm> What happens if f(x) is evaluated if e(x) is false?  An
jcm> exception?  I'd consider that a side effect.

What happens is that your program is incorrect.

-- 
Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark




More information about the Python-list mailing list