Movatterモバイル変換
[0]ホーム
[Python-Dev] LinkedHashSet/LinkedHashMap equivalents
Thomas Hellertheller at python.net
Wed Mar 9 22:19:39 CET 2005
Steven Bethard <steven.bethard at gmail.com> writes:> Thomas Heller <theller at python.net> wrote:>> [About an ordered dictionary]> [snip]>> I cannot understand why people are against adding it to stdlib (after>> the name, the implementation, and the exact place have been decided).>> It's certainly a useful data type, isn't it?>> Well, that was basically the question I posed. So far I've seen only> one use for it, and that one is better served by adding a function to> itertools.Hm, removing duplicates from a list is an algorithm, not a datastructure. And the code you posted (no offense intended) is, also imo,faster written by an experienced programmer than located in some module.OTOH, I see no problem adding it to itertools.> 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 theuse case I once had right now, and probably the code has been rewrittenanyway. But I assume use cases exist, otherwise there weren't so manyrecipes for the ordered dictionary.Thomas
More information about the Python-Devmailing list
[8]ページ先頭