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

[Python-Dev] Switch statement

[Python-Dev] Switch statement [Python-Dev] Switch statementPhillip J. Eby pje at telecommunity.com
Wed Jun 21 07:31:35 CEST 2006
At 10:14 PM 6/20/2006 -0700, Guido van Rossum wrote:
>Hm, so this still doesn't help if you write
>
>   case S: ...
>
>(where S is an immutable set or sequence) when you meant
>
>   case in S: ...
>
>so I'm not sure if it's worth the subtleties.

Well, EIBTI and all that:

     switch x:
         case == 1: foo(x)
         case in S: bar(x)

It even lines up nicely.  :)

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