Thanks a million!<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 7, 2012 at 3:47 PM, Chris Rebert <span dir="ltr"><<a href="mailto:clp2@rebertia.com" target="_blank">clp2@rebertia.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thursday, December 6, 2012, INADA Naoki  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

The reference says:<br>
<br>
  The truth of x==y does not imply that x!=y is false.<br>
  Accordingly, when defining __eq__(), one should also<br>
  define __ne__() so that the operators will behave as expected.<br>
<br>
(<a href="http://docs.python.org/3/reference/datamodel.html#object.__eq__" target="_blank">http://docs.python.org/3/reference/datamodel.html#object.__eq__</a>)<br>
<br>
But I saw different behavior on 3.3:<br>
<a href="https://gist.github.com/4231096" target="_blank">https://gist.github.com/4231096</a><br>
<br>
Could anyone teach me what happen about my code?<br>
</blockquote><div><br></div><div>The reference is not completely accurate in this case. <span></span>See</div><div dir="ltr"> <span style="font-family:'.HelveticaNeueUI';white-space:nowrap"><a href="http://bugs.python.org/issue4395" target="_blank">http://bugs.python.org/issue4395</a></span></div>


<div dir="ltr"><span>"</span><span style="font-family:'.HelveticaNeueUI';white-space:nowrap">Document auto __ne__ generation; [...]"</span><span class="HOEnZb"><font color="#888888"><span style="font-family:'.HelveticaNeueUI';white-space:nowrap"><br dir="ltr">


</span></font></span></div><span class="HOEnZb"><font color="#888888"><br><br>-- <br>Cheers,<br>Chris<br>--<br><a href="http://rebertia.com" target="_blank">http://rebertia.com</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>INADA Naoki  <<a href="mailto:songofacandy@gmail.com">songofacandy@gmail.com</a>><br>
</div>