[pypy-issue] [issue857] u"%s" % O() that has unicode __repr__() fails

Armin Rigo tracker at bugs.pypy.org
Tue Sep 6 19:34:48 CEST 2011

Armin Rigo <armin.rigo at gmail.com> added the comment:

Fixed, works like CPython now.  The actual issue was actually not related to
string formatting at all.  It was just that object.__str__() was implemented by
calling space.repr(), instead of directly calling the __repr__() method.  The
difference is that the first does type checking on the result, while the latter
does not.  It's not the job of object.__str__() to do type checking, but of its
callers.  Added tests and fix in 09816858a87a.

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list