At 03:52 PM 6/26/2006 -0700, Guido van Rossum wrote: >It's the >messiness of trying to define rules that are as flexible as needed for >optimization and yet claiming to maintain the strict if/elif-chain >semantics.
Hear, hear! We already have if/elif, we don't need another way to spell it. The whole point of switch is that it asserts that exactly *one* case is supposed to match -- which means by definition that the *order* of the cases must not matter. It is an unprioritized selection, rather than sequential selection. I think that probably the biggest misunderstanding of switch that has been put forth is that it's shorthand for a particular pattern of if-elif use, when in actuality it's the other way around: if-elif is sometimes used as a crude workaround for the absence of a switch feature. _______________________________________________ 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