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

jcm joshway_without_spam at myway.com
Tue Feb 18 12:57:56 EST 2003


Your claim was that side effects don't enter into the picture (I disagree).
Saying "your program is incorrect" doesn't tell me enough.

Andrew Koenig <ark at research.att.com> wrote:
> 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