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

[Python-Dev] Switch statement

[Python-Dev] Switch statement [Python-Dev] Switch statementFredrik Lundh fredrik at pythonware.com
Wed Jun 21 18:41:54 CEST 2006
Guido van Rossum wrote:

> (Note how I've switched to the switch-for-efficiency camp, since it
> seems better to have clear semantics and a clear reason for the syntax
> to be different from if/elif chains.)

if you're now in the efficiency camp, why not just solve this on the 
code generator level ?  given

     var = some expression
     if var == constant:
         ...
     elif var == constant:
         ...

let the compiler use a dispatch table, if it can and wants to.

</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