mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Rip out all the u"..." literals and calls to unicode().
This commit is contained in:
parent
572dbf8f13
commit
ef87d6ed94
200 changed files with 18074 additions and 18074 deletions
|
@ -70,7 +70,7 @@ class TextWrapper:
|
|||
whitespace_trans = string.maketrans(_whitespace, ' ' * len(_whitespace))
|
||||
|
||||
unicode_whitespace_trans = {}
|
||||
uspace = ord(u' ')
|
||||
uspace = ord(' ')
|
||||
for x in map(ord, _whitespace):
|
||||
unicode_whitespace_trans[x] = uspace
|
||||
|
||||
|
@ -127,7 +127,7 @@ class TextWrapper:
|
|||
if self.replace_whitespace:
|
||||
if isinstance(text, str):
|
||||
text = text.translate(self.whitespace_trans)
|
||||
elif isinstance(text, unicode):
|
||||
elif isinstance(text, str):
|
||||
text = text.translate(self.unicode_whitespace_trans)
|
||||
return text
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue