[Python-Dev] Switch statement
Phillip J. Eby
pje at telecommunity.com
Wed Jun 21 03:06:07 CEST 2006
At 12:26 PM 6/21/2006 +1200, Greg Ewing wrote:
>Guido van Rossum wrote:
>
> > But it would be easy enough to define a dict-filling function that
> > updates only new values.
>
>Or evaluate the case expressions in reverse order.
-1; stepping through the code in a debugger is going to be weird enough,
what with the case statements being executed at function definition time,
without the reverse order stuff. I'd rather make it an error to list the
same value more than once; we can just check if the key is present before
defining that value.
More information about the Python-Dev
mailing list