Ternary Operator Now?

Roy Smith roy at panix.com
Wed Feb 8 18:40:43 EST 2006


Steve Holden  <steve at holdenweb.com> wrote:
>> x = y if C : else z
>> 
>
>Currently scheduled for next (2.5) release, but not yet implemented.

This still makes me barf.  Has Python jumped the shark?

It looks marginally better if you write it as:

x = (y if C else z)



More information about the Python-list mailing list