[pypy-svn] r76118 - pypy/branch/fast-forward/pypy/objspace/std
benjamin at codespeak.net
benjamin at codespeak.net
Mon Jul 12 01:09:18 CEST 2010
Author: benjamin
Date: Mon Jul 12 01:09:14 2010
New Revision: 76118
Modified:
pypy/branch/fast-forward/pypy/objspace/std/newformat.py
Log:
no unicode(integer) in rpython
Modified: pypy/branch/fast-forward/pypy/objspace/std/newformat.py
==============================================================================
--- pypy/branch/fast-forward/pypy/objspace/std/newformat.py (original)
+++ pypy/branch/fast-forward/pypy/objspace/std/newformat.py Mon Jul 12 01:09:14 2010
@@ -682,7 +682,10 @@
def _int_to_base(self, base, value):
if base == 10:
- return unicode(value) if self.is_unicode else str(value)
+ s = str(value)
+ if self.is_unicode:
+ return s.decode("ascii")
+ return s
# This part is slow.
negative = value < 0
value = abs(value)
More information about the Pypy-commit
mailing list