Author: Armin Rigo <[email protected]>
Branch: py3.5
Changeset: r86791:5ddc53d46363
Date: 2016-08-31 20:04 +0100
http://bitbucket.org/pypy/pypy/changeset/5ddc53d46363/
Log: Quick non-fix to let translation proceed
diff --git a/pypy/objspace/std/formatting.py b/pypy/objspace/std/formatting.py
--- a/pypy/objspace/std/formatting.py
+++ b/pypy/objspace/std/formatting.py
@@ -441,6 +441,13 @@
self.fmt_a(w_value)
def fmt_a(self, w_value):
+ if not do_unicode:
+ # - on the bytes StringFormatter, %r or %a must not call
+ # std_wp(unicode)
+ raise NotImplementedError("FIX ME")
+ # - another problem with fmt_r = fmt_a is that on
+ # UnicodeFormatter, repr() != ascii() sometimes
+
from pypy.objspace.std.unicodeobject import ascii_from_object
w_value = ascii_from_object(self.space, w_value)
self.std_wp(self.space.unicode_w(w_value))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit