PEP 308: "then" "else" for deprecating "and" "or" side effects

Christian Tismer tismer at
Sat Feb 15 05:33:22 CET 2003

Bengt Richter wrote:
> On Fri, 14 Feb 2003 04:17:17 +0100, Christian Tismer <tismer at> wrote:
>>Dear community,
>>there has been some favor of my silly/simple a then b else c proposal.
> I kind of like it, but the "then" word is not ideal, IMO. To express
> conditional evaluation (i.e., the short-circuit aspect), perhaps a
> little change?
>     a condevals b else c
> or maybe
>     a chooses b else c
> or
>     a picks b else c

You are technically right.

But that "when" approach took me like a charm...
I have argued that "then" and "when" just make
a difference of a single letter. This was completely
crappy, since "when" replaces "if", not "then".

Isn't that just elegant? Elegance is a very
high level of Pythoniciy, rarely reached.
I really, really like it.

I now realize that I wasn't so unhappy with the order
of constructs, but of the misplaced "if", literally.
"when" is much less of a problem to me.

Think it over - ly y'rs -- chris

Christian Tismer             :^)   <mailto:tismer at>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship*
14109 Berlin                 :     PGP key ->
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?

More information about the Python-list mailing list