summaryrefslogtreecommitdiffstats
path: root/Lib/textwrap.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/textwrap.py')
-rw-r--r--Lib/textwrap.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/textwrap.py b/Lib/textwrap.py
index 3fc14f0..e6e1b97 100644
--- a/Lib/textwrap.py
+++ b/Lib/textwrap.py
@@ -59,8 +59,6 @@ class TextWrapper:
Drop leading and trailing whitespace from lines.
"""
- whitespace_trans = string.maketrans(_whitespace, ' ' * len(_whitespace))
-
unicode_whitespace_trans = {}
uspace = ord(' ')
for x in _whitespace:
@@ -116,10 +114,7 @@ class TextWrapper:
if self.expand_tabs:
text = text.expandtabs()
if self.replace_whitespace:
- if isinstance(text, str8):
- text = text.translate(self.whitespace_trans)
- elif isinstance(text, str):
- text = text.translate(self.unicode_whitespace_trans)
+ text = text.translate(self.unicode_whitespace_trans)
return text