PEP-308 a "simplicity-first" alternative
Erik Max Francis
max at alcyone.com
Wed Feb 12 22:05:18 EST 2003
Bengt Richter wrote:
> This happens to fix the hole in old ternary idiom, but it is _not_
> introducing a new ternary form or other complex context-dependent
> stuff.
> If
> (x and [y] or [b])[0]
>
> is understandable, ...
It's "understandable," but it's not very readable, and it's hardly a
good substitute for a genuine bulitin conditional operator. The whole
point of one is to increase readability; this _decreases_ readability
(as does the other form involving and/or and lambdas).
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ Will I disappoint my future / If I stay
\__/ Sade
Bosskey.net: Return to Wolfenstein / http://www.bosskey.net/rtcw/
A personal guide to Return to Castle Wolfenstein.
More information about the Python-list
mailing list