Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r53624:1a2108ee3fa3 Date: 2012-03-14 17:00 -0700 http://bitbucket.org/pypy/pypy/changeset/1a2108ee3fa3/
Log: Fix. diff --git a/pypy/objspace/std/intobject.py b/pypy/objspace/std/intobject.py --- a/pypy/objspace/std/intobject.py +++ b/pypy/objspace/std/intobject.py @@ -42,6 +42,7 @@ from pypy.objspace.std.inttype import int_typedef as typedef def __init__(w_self, intval): + assert type(intval) is int or type(intval) is long w_self.intval = intval def __repr__(w_self): diff --git a/pypy/objspace/std/objspace.py b/pypy/objspace/std/objspace.py --- a/pypy/objspace/std/objspace.py +++ b/pypy/objspace/std/objspace.py @@ -167,7 +167,7 @@ return self.newint(x) # this is an inlined 'is_valid_int' which cannot be used # due to the special annotation nature of 'wrap'. - if isinstance(x, long) and (-maxint - 1 <= x <= maxint): + if type(x) is long and (-maxint - 1 <= x <= maxint): return self.newint(x) if isinstance(x, str): return wrapstr(self, x) _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit