Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71adf7e commit 4d6e8feCopy full SHA for 4d6e8fe
1 file changed
Doc/ref/ref3.tex
@@ -1089,6 +1089,11 @@ \subsection{Basic customization\label{customization}}
1089
a Boolean value, else a \exception{TypeError} will be raised.
1090
By convention, \code{False} is used for false and \code{True} for true.
1091
1092
+There are no implied relationships among the comparison operators.
1093
+The truth of {\var{x}==\var{y}} does not imply that \code{\var{x}!=\var{y}}
1094
+is false. Accordingly, when defining \method{__eq__}, one should also
1095
+define \method{__ne__} so that the operators will behave as expected.
1096
+
1097
There are no reflected (swapped-argument) versions of these methods
1098
(to be used when the left argument does not support the operation but
1099
the right argument does); rather, \method{__lt__()} and
0 commit comments