mirror of https://github.com/python/cpython.git
Add __mod__ method to UserString.
This commit is contained in:
parent
b981df9943
commit
fe4f769fb8
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue