dictionary lookup table?
Francis Avila
francisgavila at yahoo.com
Sun Nov 9 17:57:27 EST 2003
"David Eppstein" <eppstein at ics.uci.edu> wrote in message
news:eppstein-5EDB53.13420809112003 at news.service.uci.edu...
> 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.
I'm sorry, I meant "gain" in terms of performance/space, per the OP's
original concern. You are correct, however.
> --
> David Eppstein http://www.ics.uci.edu/~eppstein/
> Univ. of California, Irvine, School of Information & Computer Science
More information about the Python-list
mailing list