summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-08-21 21:47:20 (GMT)
committerFred Drake <fdrake@acm.org>2000-08-21 21:47:20 (GMT)
commita893957c8e0a514bc62f6ea7fe91a0ecf073fe83 (patch)
treebecad00eadce30e2dc7330831c7064f0f9b8d927
parent567ca8e732a75682adfdca08daaf2afa59582ad9 (diff)
downloadcpython-a893957c8e0a514bc62f6ea7fe91a0ecf073fe83.zip
cpython-a893957c8e0a514bc62f6ea7fe91a0ecf073fe83.tar.gz
cpython-a893957c8e0a514bc62f6ea7fe91a0ecf073fe83.tar.bz2
Denis S. Otkidach <den@analyt.chem.msu.ru>:
Let UserString.translate() method work with unicode data. This closes SourceForge patch #101246.
-rwxr-xr-xLib/UserString.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/UserString.py b/Lib/UserString.py
index fb83d58..070b3e1 100755
--- a/Lib/UserString.py
+++ b/Lib/UserString.py
@@ -104,8 +104,8 @@ class UserString:
def strip(self): return self.__class__(self.data.strip())
def swapcase(self): return self.__class__(self.data.swapcase())
def title(self): return self.__class__(self.data.title())
- def translate(self, table, deletechars=""):
- return self.__class__(self.data.translate(table, deletechars))
+ def translate(self, *args):
+ return self.__class__(self.data.translate(*args))
def upper(self): return self.__class__(self.data.upper())
class MutableString(UserString):