doc: mention NotImplementedError in python-comparisons.txt
We talk about returning NotImplemented as a way to say that some method, e.g.
__lt__ is not implemented for some combination of types.
However, there exists excepttion with similar from the first glance semantics
-- NotImplementedError, and in some cases it could be tempting for users to
raise it instead of returning NotImplemented, but the fact is that
'return NotImplemented' != 'raise NotImplementedError'
Python will just skip NotImplementedError with respect to choosing appropriate
comparison method, and propagate this exception upwards to the caller.
So I think we'd better warn users in the first place.
Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
Signed-off-by: Ondrej Certik <ondrej@certik.cz>