From fe4f769fb88b11ccb37e1007d0213adf3ac738b3 Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Mon, 18 Nov 2002 16:12:54 +0000 Subject: Add __mod__ method to UserString. --- Lib/UserString.py | 2 ++ 1 file changed, 2 insertions(+) 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()) -- cgit v0.12