[Python-3000-checkins] r55188 - in python/branches/py3k-struni: Lib/test/test_builtin.py Parser/tokenizer.c

guido.van.rossum python-3000-checkins at python.org
Tue May 8 20:51:31 CEST 2007


Author: guido.van.rossum
Date: Tue May  8 20:51:25 2007
New Revision: 55188

Modified:
   python/branches/py3k-struni/Lib/test/test_builtin.py
   python/branches/py3k-struni/Parser/tokenizer.c
Log:
Kill u"..." string quotes.  Thought I already did that.


Modified: python/branches/py3k-struni/Lib/test/test_builtin.py
==============================================================================
--- python/branches/py3k-struni/Lib/test/test_builtin.py	(original)
+++ python/branches/py3k-struni/Lib/test/test_builtin.py	Tue May  8 20:51:25 2007
@@ -220,7 +220,7 @@
         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 @@
             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, ())
 

Modified: python/branches/py3k-struni/Parser/tokenizer.c
==============================================================================
--- python/branches/py3k-struni/Parser/tokenizer.c	(original)
+++ python/branches/py3k-struni/Parser/tokenizer.c	Tue May  8 20:51:25 2007
@@ -1227,14 +1227,6 @@
 			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);


More information about the Python-3000-checkins mailing list