single-line terinary operators considered harmful
Erik Max Francis
max at alcyone.com
Tue Mar 4 22:41:43 EST 2003
"Clark C. Evans" wrote:
> After the select/case option presented previously, my second
> best option would be something like...
>
> var = (if 1 == x: 'yes'
> else: 'no')
>
> Where the 'else' must be in the same column as the
> corresponding if.
This is already completely compatible with the primary form proposed in
the PEP. You can insert whitespace and indentation to your heart's
content.
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ And your daddy died for you / And I'll do the same
\__/ India Arie
Bosskey.net: Counter-Strike / http://www.bosskey.net/cs/
A personal guide to Counter-Strike.
More information about the Python-list
mailing list