we need this method, and the following bad behavior goes against python&#39;s design:<br>&gt;&gt;&gt; from pywikibot import *<br>&gt;&gt;&gt; Link.__hash__<br>&lt;slot wrapper &#39;__hash__&#39; of &#39;object&#39; objects&gt;<br>

&gt;&gt;&gt; Link.__eq__<br>Traceback (most recent call last):<br>  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>AttributeError: type object &#39;Link&#39; has no attribute &#39;__eq__&#39;<br>&gt;&gt;&gt; Link.__cmp__<br>

&lt;unbound method Link.__cmp__&gt;<br>&gt;&gt;&gt; hash(Link(&#39;1&#39;))<br>26872464<br>&gt;&gt;&gt; hash(Link(&#39;1&#39;))<br>26872400<br>&gt;&gt;&gt; hash(Link(&#39;1&#39;))<br>26872464<br>&gt;&gt;&gt; Link(&#39;1&#39;)==Link(&#39;1&#39;)<br>

Found 1 wikipedia:zh processes running, including this one.<br>True<br>&gt;&gt;&gt; hash(Link(&#39;1&#39;))==hash(Link(&#39;1&#39;))<br>False<br>&gt;&gt;&gt;<br><br>