[Python-Dev] Re: PEP 308: "then" "else" for deprecating "and" "or" side effects
Christian Tismer
tismer@tismer.com
Sat, 15 Feb 2003 05:09:25 +0100
François Pinard wrote:
> [Christian Tismer]
>
>
>>Dear community,
>
>
> Nice way to salute! :-)
as it was indented to be :-)
>>there has been some favor of my silly/simple a then b else c proposal.
>
>
> Not so long ago, I added a similar feature in an ad hoc language we created
> for one project (French and specialised syntax, and written under pressure).
> Strangely enough, it did not occur to me, before this morning, that there
> was some relation with this long thread in the Python universe. :-)
>
> If I translate the keywords of our syntax back to English, it gives:
>
> a when b else c
>
> with a chainable property not requiring parentheses:
>
> a when b else c when d else ...
>
> Our language is declarative (tinily functional) rather than imperative.
> Yet, the above writings are not far from the original Guido suggestion.
Well, the difference is of course quite big to me.
a when b else c when d else ...
compared to
a if b else c if d else ...
looks much smoother.
I also could imagine "where":
a where b else c where d else ...
All in favor over re-using a strong "if".
"if" is used to be too much right-orientated...
more-of-this -- chris
--
Christian Tismer :^) <mailto:tismer@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/