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/2001-November/018453.html below:

[Python-Dev] switch-based programming in Python

[Python-Dev] switch-based programming in Python [Python-Dev] switch-based programming in PythonPaul Svensson paul-python@svensson.org
Thu, 8 Nov 2001 12:43:56 -0500 (EST)
On Thu, 8 Nov 2001, Eric S. Raymond wrote:

>Skip Montanaro <montanaro@tttech.com>:
>> One other post I saw in this thread used explicit breaks as is required in
>> C.  I would get rid of that.  When the current case's code ends, control
>> flow should just jump to the end of the switch.
>
>I disagree. Such fallthrough is very useful when writing state machines,
>which is a significant part of the utility of a case statement.

+0 on the idea of some kind of switch statement, but
-1 on bringing C's glorified computed GOTO into Python.

Maybe it would be a good idea to use some other keyword(s),
so as to avoid confusion with C altogether,
e.g select/when instead of switch/case.

	/Paul




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