[Python-Dev] Switch statement

Guido van Rossum guido at python.org
Sat Jun 24 02:52:35 CEST 2006


On 6/23/06, Josiah Carlson <jcarlson at uci.edu> wrote:
> This is a good thing, because if switch/case ends up functionally
> identical to if/elif/else, then it has no purpose as a construct.  On
> the other hand, because it is different from if/elif/else, and it is
> different in such a way to make certain blocks of code (arguably) easier
> to read or understand, (likely provably) faster, then it actually has a
> purpose and use.

Excellent formulation!

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list