[Python-Dev] Switch statement

Guido van Rossum guido at python.org
Wed Jun 21 07:16:21 CEST 2006


On 6/20/06, Guido van Rossum <guido at python.org> wrote:
>   case A: ... if x == A...
>   cases S: ...if x in A...
>
> or perhaps (saving a keyword):
>
>   case A: ... if x == A...
>   case in S: ...if x in A...

I was too quick with cut/paste here; I meant

  case S: ...if x in S...

or

  case in S: ...if x in S...

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list