[Info] PEP 308 accepted - new conditional expressions

Peter Hansen peter at engcorp.com
Wed Oct 12 19:31:34 EDT 2005


Dave Hansen wrote:
> So lose the "if."
> 
>    R = C then A else B

It would be nice (in my opinion) if this were the way it was going to 
be.  Having one of the two results come first makes that result seem 
somehow of primary importance, while the conditional (which in my mind 
is far more important than either result) comes hidden in the middle:

"C then A else B"   makes the conditional stand out

"A if C else B"     suggests that A is more important than B and hides C

But I can live with whichever it is... not that I have any choice. :)

-Peter



More information about the Python-list mailing list