[Python-Dev] PEP 3103: A Switch/Case Statement
kd5bjo at gmail.com
Thu Jun 29 17:42:07 CEST 2006
> yeah, but what are they? integers? strings? names without an associated value?
> how do you create new labels? where are they stored? who keeps track of them?
In this scheme, dispatch tables can be considered to be reverse-lookup
namespaces. Where a regular namespace is used to look up a value
given its name, a dispatch table is used to look up a name given its
value. The switch statement then lets you actually do something based
on which name is returned.
-- Eric Sumner
More information about the Python-Dev