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

sik0fewl xxdigitalhellxx at hotmail.com
Thu Feb 27 11:29:35 EST 2003


A. Lloyd Flanagan wrote:
> "Sean Ross" <sross at connectmail.carleton.ca> wrote in message news:<log3a.33806$Ww1.902882 at news20.bellglobal.com>...
> 
>>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 :)

-- 
Ryan





More information about the Python-list mailing list