Author: Alex Gaynor <[email protected]>
Branch: jit-settrace
Changeset: r67594:664414f1f20e
Date: 2013-10-24 20:03 -0700
http://bitbucket.org/pypy/pypy/changeset/664414f1f20e/

Log:    mergedd efault

diff --git a/rpython/rtyper/lltypesystem/lltype.py 
b/rpython/rtyper/lltypesystem/lltype.py
--- a/rpython/rtyper/lltypesystem/lltype.py
+++ b/rpython/rtyper/lltypesystem/lltype.py
@@ -97,16 +97,8 @@
     def __eq__(self, other):
         if isinstance(other, Typedef):
             return other.__eq__(self)
-        if self.__class__ is other.__class__:
-            if self is other:
-                return True
-            try:
-                if hash(self) != hash(other):
-                    return False
-            except TypeError:
-                pass # too bad, we can't use a fastpath here
-            return safe_equal(self.__dict__, other.__dict__)
-        return False
+        return self.__class__ is other.__class__ and (
+            self is other or safe_equal(self.__dict__, other.__dict__))
 
     def __ne__(self, other):
         return not (self == other)
@@ -235,9 +227,6 @@
         self.OF = OF
         self.c_name = c_name
 
-    def __hash__(self):
-        return hash(self.OF)
-
     def __repr__(self):
         return '<Typedef "%s" of %r>' % (self.c_name, self.OF)
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to