I just want to figure out the logic behind these results:

```
>>>nan = float('nan')
>>>nan == nan
False 
# I understand that this is because the __eq__ method is defined this way
>>>nan in [nan]
True 
# This is because the __contains__ method for list is defined to compare the identity first then the content?

```

But in both cases I think behind the scene the function `PyObject_RichCompareBool` is called right? Why there is a difference? Shouldn't they have the same behaviour?