[Python-Dev] Switch statement
Greg Ewing
greg.ewing at canterbury.ac.nz
Wed Jun 21 01:54:45 CEST 2006
Josiah Carlson wrote:
> Offering arbitrary expressions whose
> meaning can vary at runtime would kill any potential speedup (the
> ultimate purpose for having a switch statement)
I don't agree that speedup is *the* ultimate purpose
of a switch statement. There's also the matter of
providing a construct that expresses the high-level
intent of the code more clearly than an if-else
chain. I think both of these are equally important.
--
Greg
More information about the Python-Dev
mailing list