Danny Yoo wrote:
> But as Kent mentioned, though, perhaps the easiest thing to implement is a
> simple linear scan across all your key-values, and not worry until we know
> this is a performance hotspot.  *grin* It really depends on how many
> entries we're searching against.

Another alternative is just a list of (key, value) pairs, that is easy to 
search with linear search. The only reason to keep a dict is if you are at some 
point doing a lookup by key. Without knowing more about your app I don't know 
if that is a requirement or not.

Kent

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to