dictionary lookup table?
eppstein at ics.uci.edu
Sun Nov 9 22:42:08 CET 2003
In article <vqt288ck2mgkd8 at corp.supernews.com>,
"Francis Avila" <francisgavila at yahoo.com> wrote:
> I don't think you are abusing the dictionary at all, but if you're using
> Python 2.3, you can use the set module, which more closely matches the
> semantics of your problem. However, as of now the set module is implemented
> with dictionaries anyway, so I don't see that you gain much.
You gain in expressing more clearly the intent of your code.
David Eppstein http://www.ics.uci.edu/~eppstein/
Univ. of California, Irvine, School of Information & Computer Science
More information about the Python-list