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

[Python-Dev] Switch statement

[Python-Dev] Switch statement [Python-Dev] Switch statementEric Sumner kd5bjo at gmail.com
Fri Jun 23 20:02:11 CEST 2006
On 6/22/06, Guido van Rossum <guido at python.org> wrote:
> (3) A switch is implemented using a dict which is precomputed at the
> same time its static expressions are precomputed. The switch
> expression must be hashable. Overlap between different cases will
> raise an exception at precomputation time.

How does this interact with __contains__, __len__, and __iter__ for
the 'case in S' statement?  Would it work with a class that only
implements __contains__, such as a continuous range class?

  -- Eric Sumner
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