[Python-ideas] Add OrderedSet now that OrderedDict is in collections

Steven D'Aprano steve at pearwood.info
Sat May 9 17:39:47 CEST 2009


On Sat, 9 May 2009 11:53:42 pm MRAB wrote:

> There's also the question of whether the order is significant. Does a
> == b if a and b contain exactly the same items, but in a different
> order? If they are lists, then yes; if they are multisets, then no.

I'm afraid you have made a mistake. List equality does not ignore order.

>>> [1, 2, 3] == [2, 1, 3]
False


-- 
Steven D'Aprano



More information about the Python-ideas mailing list