A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-June/066482.html below:

[Python-Dev] Switch statement

[Python-Dev] Switch statement [Python-Dev] Switch statementFredrik Lundh fredrik at pythonware.com
Sat Jun 24 17:03:17 CEST 2006
Josiah Carlson 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.

there's no shortage of Python constructs that are functionally identical 
to existing constructs.  as with all syntactic "sugar", the emphasis 
should be on what the programmer wants to express, not how you can 
artificially constrain the implementation to make the new thing slightly 
different from what's already in there.

and the point of switch/case is to be able to say "I'm going to dispatch 
on a single value" in a concise way; the rest is optimizations.

</F>

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4