diff options
author | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2002-11-18 16:12:54 (GMT) |
---|---|---|
committer | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2002-11-18 16:12:54 (GMT) |
commit | fe4f769fb88b11ccb37e1007d0213adf3ac738b3 (patch) | |
tree | ee27068236d18df64e1f9191eec79ff8c67cd0f3 /Lib/UserString.py | |
parent | b981df99439c0c4ef4524354d8fd010ea440263f (diff) | |
download | cpython-fe4f769fb88b11ccb37e1007d0213adf3ac738b3.zip cpython-fe4f769fb88b11ccb37e1007d0213adf3ac738b3.tar.gz cpython-fe4f769fb88b11ccb37e1007d0213adf3ac738b3.tar.bz2 |
Add __mod__ method to UserString.
Diffstat (limited to 'Lib/UserString.py')
-rwxr-xr-x | Lib/UserString.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/UserString.py b/Lib/UserString.py index 8bd2c42..2819ab0 100755 --- a/Lib/UserString.py +++ b/Lib/UserString.py @@ -55,6 +55,8 @@ class UserString: 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()) |