Add __mod__ method to UserString.

This commit is contained in:
Neil Schemenauer 2002-11-18 16:12:54 +00:00
parent b981df9943
commit fe4f769fb8
1 changed files with 2 additions and 0 deletions

View File

@ -55,6 +55,8 @@ def __radd__(self, other):
def __mul__(self, n):
return self.__class__(self.data*n)
__rmul__ = __mul__
def __mod__(self, args):
return self.__class__(self.data % args)
# the following methods are defined in alphabetical order:
def capitalize(self): return self.__class__(self.data.capitalize())