[Python-Dev] Switch statement

Georg Brandl g.brandl at gmx.net
Tue Jun 20 16:04:11 CEST 2006


Guido van Rossum wrote:
> On 6/19/06, Raymond Hettinger <rhettinger at ewtllc.com> wrote:
>> > I say, let someone give a complete implementation a try, and then try
>> > to modify as much standard library code as possible to use it. Then
>> > report back. That would be a very interesting experiment to do. (And
>> > thanks for the pointer to sre_compile.py as a use case!)
>>>> Hmm, it could be time for the Georg bot to graduate to big game.
>> Georg, are you up to it?

I feel I am, and I'll have enough time until 2.6 anyway.
However, I first want to know that the syntax and semantics have been
properly discussed and fixed.
One thing I like to propose which could resolve the ambiguity of
"case 1,2,3:" is:
switch x:
 case (1, 2, 3):
 # if x is the tuple (1,2,3)
 case in 1, 2, 3:
 # if x is 1, 2 or 3
> Georg is a bot? :-)

Yes, I was initiated in Reykjavik ;)
Georg


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /