[Python-Dev] LinkedHashSet/LinkedHashMap equivalents

Steven Bethard steven.bethard at gmail.com
Wed Mar 9 22:30:18 CET 2005

Thomas Heller <theller at python.net> wrote:
> Steven Bethard <steven.bethard at gmail.com> writes:
> >  What use do you have for it other than filtering
> > duplicates from a list while retaining order?
> If this were the only use case, you are right.  I cannot remember the
> use case I once had right now, and probably the code has been rewritten
> anyway.  But I assume use cases exist, otherwise there weren't so many
> recipes for the ordered dictionary.

Sorry, I didn't mean to come across as suggesting that there weren't
other use cases for it.  I'm only asking for people who know these
other use cases to present them here.

At the moment, we have only one use case, and for that use case,
OrderedDict/OrderedSet isn't really the best solution.  (That's all my
code was intended to point out -- I don't really care if it makes it
into itertools or not.)  If people could present a few reasonable
problems where OrderedDict/OrderedSet really do provide the best
solutions, and then make the case that these use cases are reasonably
frequent, I think there would be much better support for adding such
types to the standard library.

You can wordify anything if you just verb it.
        --- Bucky Katt, Get Fuzzy

More information about the Python-Dev mailing list