Commit e5e80b8c authored by Guido van Rossum's avatar Guido van Rossum

Kill u"..." string quotes. Thought I already did that.

parent b8142c3e
...@@ -220,7 +220,7 @@ class BuiltinTest(unittest.TestCase): ...@@ -220,7 +220,7 @@ class BuiltinTest(unittest.TestCase):
self.assertRaises(TypeError, compile, 'pass', '?', 'exec', self.assertRaises(TypeError, compile, 'pass', '?', 'exec',
mode='eval', source='0', filename='tmp') mode='eval', source='0', filename='tmp')
if have_unicode: if have_unicode:
compile('print(u"\xe5")\n', '', 'exec') compile('print("\xe5")\n', '', 'exec')
self.assertRaises(TypeError, compile, chr(0), 'f', 'exec') self.assertRaises(TypeError, compile, chr(0), 'f', 'exec')
self.assertRaises(ValueError, compile, str('a = 1'), 'f', 'bad') self.assertRaises(ValueError, compile, str('a = 1'), 'f', 'bad')
...@@ -340,7 +340,7 @@ class BuiltinTest(unittest.TestCase): ...@@ -340,7 +340,7 @@ class BuiltinTest(unittest.TestCase):
self.assertEqual(eval(str('c'), globals, locals), 300) self.assertEqual(eval(str('c'), globals, locals), 300)
## bom = b'\xef\xbb\xbf' ## bom = b'\xef\xbb\xbf'
## self.assertEqual(eval(bom + b'a', globals, locals), 1) ## self.assertEqual(eval(bom + b'a', globals, locals), 1)
self.assertEqual(eval('u"\xe5"', globals), u"\xe5") self.assertEqual(eval('"\xe5"', globals), "\xe5")
self.assertRaises(TypeError, eval) self.assertRaises(TypeError, eval)
self.assertRaises(TypeError, eval, ()) self.assertRaises(TypeError, eval, ())
......
...@@ -1227,14 +1227,6 @@ tok_get(register struct tok_state *tok, char **p_start, char **p_end) ...@@ -1227,14 +1227,6 @@ tok_get(register struct tok_state *tok, char **p_start, char **p_end)
if (c == '"' || c == '\'') if (c == '"' || c == '\'')
goto letter_quote; goto letter_quote;
break; break;
case 'u':
case 'U':
c = tok_nextc(tok);
if (c == 'r' || c == 'R')
c = tok_nextc(tok);
if (c == '"' || c == '\'')
goto letter_quote;
break;
case 'b': case 'b':
case 'B': case 'B':
c = tok_nextc(tok); c = tok_nextc(tok);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment