PEP 308: "then" "else" for deprecating "and" "or" side effects

sik0fewl xxdigitalhellxx at
Thu Feb 27 17:29:35 CET 2003

A. Lloyd Flanagan wrote:
> "Sean Ross" <sross at> wrote in message news:<log3a.33806$Ww1.902882 at>...
>>And, while we're here, doesn't that sound nice?
>>    wear = "jacket" when outside.iscold() else None
> I'm convinced.
> +1 to 'x when C else y'

I like "case: (cond, iftrue, iffalse)". This could also be written as 
"case:(cond, iftrue, iffalse)".

I never got any replies the first time I suggested this, so I'm sure 
nobody else likes it :)


More information about the Python-list mailing list