Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r62822:efd59c9bf139
Date: 2013-03-26 17:55 -0700
http://bitbucket.org/pypy/pypy/changeset/efd59c9bf139/

Log:    restore is_w, broken in the last default merge

diff --git a/pypy/objspace/std/inttype.py b/pypy/objspace/std/inttype.py
--- a/pypy/objspace/std/inttype.py
+++ b/pypy/objspace/std/inttype.py
@@ -196,7 +196,7 @@
             return False
         if self.user_overridden_class or w_other.user_overridden_class:
             return self is w_other
-        return space.int_w(self) == space.int_w(w_other)
+        return space.bigint_w(self).eq(space.bigint_w(w_other))
 
     def immutable_unique_id(self, space):
         if self.user_overridden_class:
diff --git a/pypy/objspace/std/test/test_longobject.py 
b/pypy/objspace/std/test/test_longobject.py
--- a/pypy/objspace/std/test/test_longobject.py
+++ b/pypy/objspace/std/test/test_longobject.py
@@ -346,3 +346,9 @@
 
     def test_base_overflow(self):
         raises(ValueError, int, '42', 2**63)
+
+    def test_large_identity(self):
+        import sys
+        a = sys.maxsize + 1
+        b = sys.maxsize + 2
+        assert a is not b
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to