Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8dbca06

Browse files
committed
Reverted r62128 on Guido's orders
1 parent 247bd2e commit 8dbca06

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

Lib/test/test_unicode.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ def test_literals(self):
6868
self.assertRaises(SyntaxError, eval, '\'\\Ufffffffe\'')
6969
self.assertRaises(SyntaxError, eval, '\'\\Uffffffff\'')
7070
self.assertRaises(SyntaxError, eval, '\'\\U%08x\'' % 0x110000)
71-
# Test that raw mode does unicode escapes
72-
self.assertEqual(r"\u0020", " ")
7371

7472
def test_repr(self):
7573
if not sys.platform.startswith('java'):

Python/ast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3231,7 +3231,7 @@ parsestr(struct compiling *c, const node *n, int *bytesmode)
32313231
return NULL;
32323232
}
32333233
}
3234-
if (!*bytesmode) {
3234+
if (!*bytesmode && !rawmode) {
32353235
return decode_unicode(s, len, rawmode, c->c_encoding);
32363236
}
32373237
if (*bytesmode) {

0 commit comments

Comments
 (0)