[Python-Dev] Re: switch statement

Brian Beck exogen at gmail.com
Tue Apr 26 03:21:37 CEST 2005


Donovan Baarda wrote:
> Agreed. I don't find any switch syntaxes better than if/elif/else. Speed
> benefits belong in implementation optimisations, not new bad syntax.

I posted this 'switch' recipe to the Cookbook this morning, it saves
some typing over the if/elif/else construction, and people seemed to
like it. Take a look:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/410692

--
Brian Beck
Adventurer of the First Order



More information about the Python-Dev mailing list