SequenceMatcher with custom comparison function
<p>I tryed to execute the following code: (in python)</p>

<pre><code>from difflib import SequenceMatcher as sm
class myint(int):
    def __cmp__(self , other):
        return 0
    def __eq__(self , other):
        return True

a = myint(1)
b = myint(2)  
c = myint(3)  
d = myint(1)
e = myint(2)
f = myint(3)
x = [a,b,c]
y = [f,e,d]
q = sm(None,x,y)
</code></pre>

<p>like you can see, in these code I tryed to use a custom comparison function, such that every two instances of myint are equal. but, when I use SequenceMatcher to compare twe lists of myint with the same length, I got an unexepted result:</p>

<pre><code>&gt;&gt;&gt; q.ratio()
1:  0.3333333333333333
</code></pre>

<p>instead of 1.0. I see that SequenceMatcher used the regular comparison between numbers instead of my comparison, although the lists were consisted of objects from type "myint".<br>
How can I write the myint class such that SequenceMatcher will return 1.0, as exepted?<br>
(or any other idea to use SequenceMatcher with custom comparison function)</p>
