Raymond Hettinger wrote:

>  switch x:
>     case 1:  one()
>     case 2:  two()
>     case 3:  three()
>     default:  too_many()
> 
> Do we require that x be hashable so that the compiler can use a lookup 
> table?

That sounds reasonable.

--
Greg
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to