diff options
author | Guido van Rossum <guido@python.org> | 2007-05-08 18:51:25 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-05-08 18:51:25 (GMT) |
commit | e5e80b8c561de3a13154fa45eafcb32b8695eea7 (patch) | |
tree | b15c4dd163c4661926e85dd63a5ef09734110a9c | |
parent | b8142c3e6403cdcff38b808b3d881b6e8da064d8 (diff) | |
download | cpython-e5e80b8c561de3a13154fa45eafcb32b8695eea7.zip cpython-e5e80b8c561de3a13154fa45eafcb32b8695eea7.tar.gz cpython-e5e80b8c561de3a13154fa45eafcb32b8695eea7.tar.bz2 |
Kill u"..." string quotes. Thought I already did that.
-rw-r--r-- | Lib/test/test_builtin.py | 4 | ||||
-rw-r--r-- | Parser/tokenizer.c | 8 |
2 files changed, 2 insertions, 10 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index 3ea8ffb..58cb29b 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -220,7 +220,7 @@ class BuiltinTest(unittest.TestCase): self.assertRaises(TypeError, compile, 'pass', '?', 'exec', mode='eval', source='0', filename='tmp') if have_unicode: - compile('print(u"\xe5")\n', '', 'exec') + compile('print("\xe5")\n', '', 'exec') self.assertRaises(TypeError, compile, chr(0), 'f', 'exec') self.assertRaises(ValueError, compile, str('a = 1'), 'f', 'bad') @@ -340,7 +340,7 @@ class BuiltinTest(unittest.TestCase): self.assertEqual(eval(str('c'), globals, locals), 300) ## bom = b'\xef\xbb\xbf' ## 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, ()) diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index 563fbf2..0428e01 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -1227,14 +1227,6 @@ tok_get(register struct tok_state *tok, char **p_start, char **p_end) if (c == '"' || c == '\'') goto letter_quote; 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': c = tok_nextc(tok); |