From 8dbca06b220b1ac2bfbccb09fb07f6f2ab4213f4 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 5 Apr 2008 14:49:54 +0000 Subject: Reverted r62128 on Guido's orders --- Lib/test/test_unicode.py | 2 -- Python/ast.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index 63e10af..f7e7cb4 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -68,8 +68,6 @@ class UnicodeTest( self.assertRaises(SyntaxError, eval, '\'\\Ufffffffe\'') self.assertRaises(SyntaxError, eval, '\'\\Uffffffff\'') self.assertRaises(SyntaxError, eval, '\'\\U%08x\'' % 0x110000) - # Test that raw mode does unicode escapes - self.assertEqual(r"\u0020", " ") def test_repr(self): if not sys.platform.startswith('java'): diff --git a/Python/ast.c b/Python/ast.c index 218436f..6a9658a 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -3231,7 +3231,7 @@ parsestr(struct compiling *c, const node *n, int *bytesmode) return NULL; } } - if (!*bytesmode) { + if (!*bytesmode && !rawmode) { return decode_unicode(s, len, rawmode, c->c_encoding); } if (*bytesmode) { -- cgit v0.12