Author: Carl Friedrich Bolz-Tereick <[email protected]>
Branch: py3.7
Changeset: r98465:1d123ac3bc5a
Date: 2020-01-06 21:26 +0100
http://bitbucket.org/pypy/pypy/changeset/1d123ac3bc5a/

Log:    fix translation

diff --git a/pypy/interpreter/astcompiler/unparse.py 
b/pypy/interpreter/astcompiler/unparse.py
--- a/pypy/interpreter/astcompiler/unparse.py
+++ b/pypy/interpreter/astcompiler/unparse.py
@@ -478,9 +478,10 @@
                 self.space.newtext("expression type not supported yet:" + 
str(node)))
 
     def visit_Str(self, node):
+        from rpython.rlib import rstring
         s, l = self.space.utf8_len_w(node.s)
-        s = s.replace("{", "{{")
-        s = s.replace("}", "}}")
+        s = rstring.replace(s, "{", "{{")
+        s = rstring.replace(s, "}", "}}")
         self.append_utf8(s)
 
     def visit_FormattedValue(self, node):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to