Best way to make a list unique?
Delaney, Timothy C (Timothy)
tdelaney at avaya.com
Tue Mar 8 21:30:38 EST 2005
Michael Hoffman wrote:
>>> For those who don't know, these implement a hash set/map which
>>> iterates in the order that the keys were first added to the set/map.
>
> I would love to see such a thing.
I've proposed this on python-dev, but the general feeling so far is
against it. So far the only use case is to remove duplicates without
changing order, and there are iterator-based solutions which would
normally be preferable.
It's pretty simple to roll your own, and I'll probably put together a
Cookbook recipe for it.
Tim Delaney
More information about the Python-list
mailing list