[pypy-commit] pypy py3k: restore is_w, broken in the last default merge
pjenvey
noreply at buildbot.pypy.org
Wed Mar 27 01:56:07 CET 2013
Author: Philip Jenvey <pjenvey at underboss.org>
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
More information about the pypy-commit
mailing list