[pypy-commit] pypy default: Backed out changeset f8086f9fc11d

justinpeel noreply at buildbot.pypy.org
Wed Aug 24 00:45:25 CEST 2011


Author: Justin Peel <notmuchtotell at gmail.com>
Branch: 
Changeset: r46751:bdc441759d76
Date: 2011-08-23 16:49 -0600
http://bitbucket.org/pypy/pypy/changeset/bdc441759d76/

Log:	Backed out changeset f8086f9fc11d

diff --git a/pypy/objspace/std/stringobject.py b/pypy/objspace/std/stringobject.py
--- a/pypy/objspace/std/stringobject.py
+++ b/pypy/objspace/std/stringobject.py
@@ -926,28 +926,26 @@
         c = s[i]
         use_bs_char = False # character quoted by backspace
 
-        # have to check for these first
         if c == '\\' or c == quote:
             bs_char = c
             use_bs_char = True
-        if not '\x20' <= c < '\x7f':
-            if c == '\t':
-                bs_char = 't'
-                use_bs_char = True
-            elif c == '\r':
-                bs_char = 'r'
-                use_bs_char = True
-            elif c == '\n':
-                bs_char = 'n'
-                use_bs_char = True
-            else:
-                n = ord(c)
-                if i != startslice:
-                    buf.append_slice(s, startslice, i)
-                startslice = i + 1
-                buf.append('\\x')
-                buf.append("0123456789abcdef"[n>>4])
-                buf.append("0123456789abcdef"[n&0xF])
+        elif c == '\t':
+            bs_char = 't'
+            use_bs_char = True
+        elif c == '\r':
+            bs_char = 'r'
+            use_bs_char = True
+        elif c == '\n':
+            bs_char = 'n'
+            use_bs_char = True
+        elif not '\x20' <= c < '\x7f':
+            n = ord(c)
+            if i != startslice:
+                buf.append_slice(s, startslice, i)
+            startslice = i + 1
+            buf.append('\\x')
+            buf.append("0123456789abcdef"[n>>4])
+            buf.append("0123456789abcdef"[n&0xF])
 
         if use_bs_char:
             if i != startslice:


More information about the pypy-commit mailing list