2 ms·
Which “that”? If you’re asking about `OrderedDict`, I’m referring to equality between `OrderedDict`s: >>> a = OrderedDict([(1, 2), (3, 4)]) >>> b = {1: 2,
by minitech 8y ago
Which “that”? If you’re asking about `OrderedDict`, I’m referring to equality between `OrderedDict`s:
>>> a = OrderedDict([(1, 2), (3, 4)])
>>> b = {1: 2, 3: 4}
>>> c = OrderedDict(reversed(a.items()))
>>> a == b == c
True
>>> a == c
False
- uryga 8y agoI was referring to this: > Also, `==` doesn’t always answer the question of whether two things are equivalent because the examples you posteda kinda make it look like it does, i.e. `1.0 == 1` even though one is a float and the other is an int.