Commit a893957c authored by Fred Drake's avatar Fred Drake

Denis S. Otkidach <den@analyt.chem.msu.ru>:

Let UserString.translate() method work with unicode data.

This closes SourceForge patch #101246.
parent 567ca8e7
......@@ -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):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment