string escaping bugs
authorRobert Bradshaw <robertwb@math.washington.edu>
Wed, 13 Aug 2008 07:33:08 +0000 (00:33 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Wed, 13 Aug 2008 07:33:08 +0000 (00:33 -0700)
Cython/Compiler/Parsing.py
tests/run/literalslice.pyx

index 9c002c5015e997b33eba202982dc35a18bdf05a5..73b9008a810dde06eb28ccc4a81c38936f4220ff 100644 (file)
@@ -622,7 +622,7 @@ def p_string_literal(s):
                         strval = systr
                     chars.append(strval)
                 else:
-                    chars.append(r'\\' + systr[1:])
+                    chars.append('\\' + systr[1:])
         elif sy == 'NEWLINE':
             chars.append('\n')
         elif sy == 'END_STRING':
index ea26690a8d23ea96416cf27bc4529b85209485ab..6b1ede72d8c82a2e7da712a292e43c6ae7b6af3d 100644 (file)
@@ -4,8 +4,8 @@ __doc__ = u"""
 
   >>> test_unicode_ascii(2)
   u'c'
-  >>> test_unicode(2)
-  u'\u00e4'
+  >>> test_unicode(2) == u'\u00e4'
+  True
 
   >>> test_int_list(2)
   3