I'm coming from Tcl-world ...

brueckd at tbye.com brueckd at tbye.com
Fri Aug 2 19:32:33 CEST 2002


On Fri, 2 Aug 2002, Tim Daneliuk wrote:

> Martin v. Löwis wrote:
> 
> >>2.) A 'switch'-thing: like a big if-elif-elif-elif-...-else but
> >>which evaluates its expression only once ... and then does all the
> >>comparisons.
> > 
> > 
> > PEP 275 proposes to include such a thing. You are encouraged to
> > comment on the PEP, either in this group, or by contacting the PEP
> > author:
> > 
> > http://www.python.org/peps/pep-0275.html
> > 
> 
> This seems to me to just be syntactic sugar and thus unneeded.
[snip]

Yeah, but being syntactic sugar doesn't necessarily make something a bad
idea. That's like saying you don't need for-loops since we have
while-loops. Heck, since we have operator.mul we don't need '*' anymore. 
;-)





More information about the Python-list mailing list