Rip out all the u"..." literals and calls to unicode().

This commit is contained in:
Guido van Rossum 2007-05-02 19:09:54 +00:00
parent 572dbf8f13
commit ef87d6ed94
200 changed files with 18074 additions and 18074 deletions

View file

@ -251,19 +251,19 @@ class ExceptionTests(unittest.TestCase):
'print_file_and_line' : None, 'msg' : 'msgStr',
'filename' : None, 'lineno' : None, 'offset' : None}),
(UnicodeError, (), {'message' : '', 'args' : (),}),
(UnicodeEncodeError, ('ascii', u'a', 0, 1, 'ordinal not in range'),
{'message' : '', 'args' : ('ascii', u'a', 0, 1,
(UnicodeEncodeError, ('ascii', 'a', 0, 1, 'ordinal not in range'),
{'message' : '', 'args' : ('ascii', 'a', 0, 1,
'ordinal not in range'),
'encoding' : 'ascii', 'object' : u'a',
'encoding' : 'ascii', 'object' : 'a',
'start' : 0, 'reason' : 'ordinal not in range'}),
(UnicodeDecodeError, ('ascii', '\xff', 0, 1, 'ordinal not in range'),
{'message' : '', 'args' : ('ascii', '\xff', 0, 1,
'ordinal not in range'),
'encoding' : 'ascii', 'object' : '\xff',
'start' : 0, 'reason' : 'ordinal not in range'}),
(UnicodeTranslateError, (u"\u3042", 0, 1, "ouch"),
{'message' : '', 'args' : (u'\u3042', 0, 1, 'ouch'),
'object' : u'\u3042', 'reason' : 'ouch',
(UnicodeTranslateError, ("\u3042", 0, 1, "ouch"),
{'message' : '', 'args' : ('\u3042', 0, 1, 'ouch'),
'object' : '\u3042', 'reason' : 'ouch',
'start' : 0, 'end' : 1}),
]
try:
@ -334,9 +334,9 @@ class ExceptionTests(unittest.TestCase):
# Make sure both instances and classes have a str and unicode
# representation.
self.failUnless(str(Exception))
self.failUnless(unicode(Exception))
self.failUnless(str(Exception))
self.failUnless(str(Exception('a')))
self.failUnless(str(Exception('a')))
self.failUnless(unicode(Exception(u'a')))
def testExceptionCleanup(self):
# Make sure "except V as N" exceptions are cleaned up properly