Rikard Bosnjakovic wrote:> I mean, it wasn't much code:>> import UserString>> class mystr(UserString.UserString):> def __init__(self, data=""):> self.data = data> def __sub__(self, other):> return self.data.replace(other, "")you mean "if self.data.endswith(other): return self.data[-len(other):]",don't you?Cheers /F