You should use:
```python
result = self.__eq__(other)
if result is not NotImplemented:
    result = not result
return result
```
or similar to avoid casting NotImplemented to a boolean.