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

[Python-Dev] switch-based programming in Python

[Python-Dev] switch-based programming in Python [Python-Dev] switch-based programming in PythonMartin v. Loewis martin@v.loewis.de
Wed, 7 Nov 2001 22:21:01 +0100
> Wouldn't it make sense to enable the byte code compiler to take the
> above construct and turn it into a dictionary based switch statement
> ?

That won't work. You cannot know what type "x" has, so you don't know
in advance how "x == 'one'" is evaluated.

Regards,
Martin




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