Is __ne__ method autogenerated?
clp2 at rebertia.com
Fri Dec 7 07:47:10 CET 2012
On Thursday, December 6, 2012, INADA Naoki wrote:
> The reference says:
> The truth of x==y does not imply that x!=y is false.
> Accordingly, when defining __eq__(), one should also
> define __ne__() so that the operators will behave as expected.
> But I saw different behavior on 3.3:
> Could anyone teach me what happen about my code?
The reference is not completely accurate in this case. See
"Document auto __ne__ generation; [...]"
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list