Voting for PEP 308 (was Re: For review: PEP 308 - If-then-els e expression)

sismex01 at hebmex.com sismex01 at hebmex.com
Tue Feb 11 12:47:01 EST 2003


> From: Hans Nowak [mailto:wurmy at earthlink.net]
> Sent: Tuesday, February 11, 2003 11:34 AM
> 
> Hmm, what if bools grew an if() method?  We could then write:
> 
>    z = (x == y).if(whentrue, whenfalse)
> 
> This strikes me as much more elegant than the other proposals.
> 
> (ducking for cover, etc :-)
> 

Hmmm... I like this, except that it doesn't short-
circuit evaluation. :-/

too bad.

-gustavo





More information about the Python-list mailing list