[Python-3000] Switch and static, redux

Talin talin at acm.org
Fri Jul 7 09:47:22 CEST 2006


Greg Ewing wrote:
> Andrew Clover wrote:
> 
> 
>>Here's another syntax off the top of my head - put the first case in the 
>>switch statement?
>>
>>   switch biscuit.type if 'digestive':
>>       ...
>>   elif in 'jammy_dodger', 'garibaldi':
>>       ...
>>   else:
>>       ...
> 
> 
> Ugly.

    switch x:
       pass
    case 1:
       ...
    case 2:
       ...

(OK you can shoot me now.)

-- Talin


More information about the Python-3000 mailing list