Re:The Python Unicode Mess
by uryga on Saturday October 06, 2018 @10:47AM
(#18155392)
Could you explain how your example shows that?
[ Parent
| on HN ]
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
FalseI 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.