Are objects with the same id always equal when comparing them with ==?
If I have two objects o1 and o2, and we know that
id(o1) == id(o2)
Then, does it follow that
o1 == o2
Or is this not always the case? The paper I'm working on says this is not the case, but in my opinion it should be true!
>>> nan = float('nan') >>> nan is nan True
or formulated the same way as in the question:
>>> id(nan) == id(nan) True
>>> nan == nan False