[Python-ideas] Add OrderedSet now that OrderedDict is in collections
MRAB
google at mrabarnett.plus.com
Sat May 9 18:01:56 CEST 2009
Steven D'Aprano wrote:
> 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
>
Oops! Wrong way round.
I meant: If they are multisets, then yes; if they are lists, then no.
More information about the Python-ideas
mailing list