summaryrefslogtreecommitdiffstats
path: root/Lib/textwrap.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-05-02 19:09:54 (GMT)
committerGuido van Rossum <guido@python.org>2007-05-02 19:09:54 (GMT)
commitef87d6ed94780fe00250a551031023aeb2898365 (patch)
tree1f8989aaaec7ec5f8b2f26498317f2022bf85531 /Lib/textwrap.py
parent572dbf8f1320c0b34b9c786e5c30ba4a4b61b292 (diff)
downloadcpython-ef87d6ed94780fe00250a551031023aeb2898365.zip
cpython-ef87d6ed94780fe00250a551031023aeb2898365.tar.gz
cpython-ef87d6ed94780fe00250a551031023aeb2898365.tar.bz2
Rip out all the u"..." literals and calls to unicode().
Diffstat (limited to 'Lib/textwrap.py')
-rw-r--r--Lib/textwrap.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/textwrap.py b/Lib/textwrap.py
index e6e089f..03b4ea8 100644
--- a/Lib/textwrap.py
+++ b/Lib/textwrap.py
@@ -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