PEP-308 a "simplicity-first" alternative
Erik Max Francis
max at alcyone.com
Wed Feb 12 18:37:26 EST 2003
Tony Lownds wrote:
> That would be fine with me. A bit better than and/else, having a
> operator conceptually be both binary and ternary puts me off.
Agree completely. The benefit of the decay to a binary operator carries
no weight with me; it's still unreadable. If anything, that is _more_
of a turn-off; it means that the entire meaning changes based on whether
the else is there or not. Not a very good idea in a language where
explicit is better than implicit.
> What advantage does this have over either `if C: x else: y' or `C then
> x else y'
I only mentioned it because it was one of the alternatives mentioned in
the PEP. The objection to it seemed to be the `if' keyword, so the
obvious compromise is `C then x else y' (with which I would be
satisfied). I still believe the full `if C: x else: y' is the best
alternative, but I would be satisfied with any of these three.
> So what about `C ? x : y' ?
Rejected by BDFL.
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ You cannot step into the same river once.
\__/ Cratylus
Python chess module / http://www.alcyone.com/pyos/chess/
A chess game adjudicator in Python.
More information about the Python-list
mailing list