# HG changeset patch # Parent 63dac5212552fba4023f963b107ccf750ab236ea Document object.__ne__() behaviour and priority of reflected comparisons Issues 4395 (__ne__), 22052 (reflection) More tests in patch for 21408 (__ne__ bug) diff -r 63dac5212552 Doc/reference/datamodel.rst --- a/Doc/reference/datamodel.rst Sat Jan 10 09:00:20 2015 +0100 +++ b/Doc/reference/datamodel.rst Sun Jan 25 22:14:20 2015 +0000 @@ -1262,10 +1262,14 @@ context (e.g., in the condition of an ``if`` statement), Python will call :func:`bool` on the value to determine if the result is true or false. - There are no implied relationships among the comparison operators. The truth - of ``x==y`` does not imply that ``x!=y`` is false. Accordingly, when - defining :meth:`__eq__`, one should also define :meth:`__ne__` so that the - operators will behave as expected. See the paragraph on :meth:`__hash__` for + By default, :meth:`__ne__` delegates to :meth:`__eq__` and + inverts the result. There are no other implied relationships + among the comparison operators, for example, + the truth of ``(x