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/066503.html below:

[Python-Dev] Simple Switch statement

[Python-Dev] Simple Switch statement [Python-Dev] Simple Switch statementAahz aahz at pythoncraft.com
Sun Jun 25 03:34:41 CEST 2006
On Sat, Jun 24, 2006, Raymond Hettinger wrote:
>
> So, that is it, my proposal for simple switch statements with a
> straight-forward implementation, fast execution, simply explained
> behavior, and applicability to to the most important use cases.

+1

I've been trying to write a response to these threads.  I don't
particularly like what looks like an attempt to shove together too many
different features into a single package.  Raymond's proposal gives
Python the switch statement people have been demanding while leaving room
for the improvements that have been suggested over a plain switch.

Phillip's point about longs and Unicode is valid, but easily addressed by
limiting cases to "hashable literal" (though we might want to explicitly
exclude floats).
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"I saw `cout' being shifted "Hello world" times to the left and stopped
right there."  --Steve Gonedes
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