string.maketrans() now produces translation tables for bytes.translate() -- wrong module?
Fix all remaining instances that did bad things with the new str.translate().
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 @@
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 @@
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