PEP 308: "then" "else" for deprecating "and" "or" side effects
tismer at tismer.com
Sat Feb 15 05:21:49 CET 2003
Erik Max Francis wrote:
> François Pinard wrote:
>>If I translate the keywords of our syntax back to English, it gives:
>> a when b else c
> This doesn't look like a good counter to the `C then x else y' proposal,
> since using `when' as the keyboard would imply the same ordering as the
> original proposal:
> x when C else y
> as in, "Put a jacket on when it's old cold outside, otherwise [else]
> where what you want." This form (with the condition in the middle) has
> already been suggested -- in fact, it was one of the first alternatives
> to the first if/else proposal brought up.
> Using it to mean
> C when x else y
> definitely "reads" wrong in English; if you want this form, the `when'
> should be a `then'.
Who cares about that single character? :-))
Seriously, I don't care too much. It is all better than a
mis-placed "if" in my eyes.
And I really don't want to see an upcoming monstrous, embraced
(if a :then b :else c) construct to creep into the language, for
the small intended benefit. It should be as tiny as the outcome,
so even "a then b else c" isn't short enough. But there are limits...
all the best -- chris
Christian Tismer :^) <mailto:tismer at tismer.com>
Mission Impossible 5oftware : Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a : *Starship* http://starship.python.net/
14109 Berlin : PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34 home +49 30 802 86 56 pager +49 173 24 18 776
PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04
whom do you want to sponsor today? http://www.stackless.com/
More information about the Python-list