On 6/22/06, Guido van Rossum <[EMAIL PROTECTED]> 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 _______________________________________________ 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