PEP 308: ternary operator

Michele Simionato mis6 at pitt.edu
Fri Feb 21 18:53:50 EST 2003


Peter Hansen <peter at engcorp.com> wrote in message news:<3E566B4D.765A7569 at engcorp.com>...
> Actually, "(true-expr) when (cond-expr) else (false-expr)" is perhaps
> my favourite over even the original, which I think bothers me more 
> with its "if" in the middle.  I'm inclined to think at least some small
> bit of code uses "when" as a keyword, mind you...  :-(
> 
> -Peter

Yes, the tty module in the standard library. Still, "when" is the more
attractive solution to me. It could be made a pseudo-keyword. But this
has been already said, not it's time for votations, not for discussions ;)

                                       Michele




More information about the Python-list mailing list