[pypy-svn] r75640 - pypy/branch/fast-forward/pypy/module/exceptions

benjamin at codespeak.net benjamin at codespeak.net
Mon Jun 28 18:17:21 CEST 2010


Author: benjamin
Date: Mon Jun 28 18:17:19 2010
New Revision: 75640

Modified:
   pypy/branch/fast-forward/pypy/module/exceptions/interp_exceptions.py
Log:
use consistent quoting

Modified: pypy/branch/fast-forward/pypy/module/exceptions/interp_exceptions.py
==============================================================================
--- pypy/branch/fast-forward/pypy/module/exceptions/interp_exceptions.py	(original)
+++ pypy/branch/fast-forward/pypy/module/exceptions/interp_exceptions.py	Mon Jun 28 18:17:19 2010
@@ -727,14 +727,14 @@
             if self.end == self.start + 1:
                 badchar = ord(self.object[self.start])
                 if badchar <= 0xff:
-                    return "%r codec can't encode character u'\\x%02x' in position %d: %s"%(
+                    return "'%s' codec can't encode character u'\\x%02x' in position %d: %s"%(
                         self.encoding, badchar, self.start, self.reason)
                 if badchar <= 0xffff:
-                    return "%r codec can't encode character u'\\u%04x' in position %d: %s"%(
+                    return "'%s' codec can't encode character u'\\u%04x' in position %d: %s"%(
                         self.encoding, badchar, self.start, self.reason)
-                return "%r codec can't encode character u'\\U%08x' in position %d: %s"%(
+                return "'%s' codec can't encode character u'\\U%08x' in position %d: %s"%(
                     self.encoding, badchar, self.start, self.reason)
-            return "%r codec can't encode characters in position %d-%d: %s" % (
+            return "'%s' codec can't encode characters in position %d-%d: %s" % (
                 self.encoding, self.start, self.end - 1, self.reason)
         """)
     descr_str.unwrap_spec = ['self', ObjSpace]



More information about the Pypy-commit mailing list