PEP 308: Alternative conditional operator forms
Erik Max Francis
max at alcyone.com
Mon Feb 10 00:53:08 EST 2003
David Gausebeck wrote:
> The reason the : makes sense for me is that the syntax here is
> essentially the same as for 'if', except that this is an expression.
> To make it even more analogous, it could be
>
> ifelse C: x else: y
...
> Why add a new keyword ('otherwise') when an existing one fits
> perfectly and causes no conflicts? 'else' in this context seems like
> a no-brainer.
I'm going to turn that one right around on you. Why add the new keyword
`ifelse'? Why not use `if'?
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ She glanced at her watch ... It was 9:23.
\__/ James Clavell
Bosskey.net: Quake III Arena / http://www.bosskey.net/q3a/
A personal guide to Quake III Arena.
More information about the Python-list
mailing list