Re: [Python-Dev] LinkedHashSet/LinkedHashMap equivalents
Thomas Heller
Steven Bethard
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.
I'm not specifically lobbying for its inclusion in stdlib, but I often find an ordered dict useful when I want both ordered and random access, e.g. situations: - database table fields/attributes - drop down field selectors In both cases, I could get by with other techniques, but I would use stdlib ordered dicts if they were available. I also prefer the term "ordered dict" to LinkedHashXXX. Jeff Bauer Rubicon, Inc.
participants (1)
-
Jeff Bauer