From 85fee25b45392dbf52df2fdb03ebcd788e8c7377 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Wed, 13 Aug 2008 00:33:08 -0700 Subject: [PATCH] string escaping bugs --- Cython/Compiler/Parsing.py | 2 +- tests/run/literalslice.pyx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index 9c002c50..73b9008a 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -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': diff --git a/tests/run/literalslice.pyx b/tests/run/literalslice.pyx index ea26690a..6b1ede72 100644 --- a/tests/run/literalslice.pyx +++ b/tests/run/literalslice.pyx @@ -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 -- 2.26.2