I'd like to subclass the built-in str type. For example: --
class MyString(str): def __init__(self, txt, data): super(MyString,self).__init__(txt) self.data = data if __name__ == '__main__': s1 = MyString("some text", 100) -- but I get the error: Traceback (most recent call last): File "MyString.py", line 27, in ? s1 = MyString("some text", 12) TypeError: str() takes at most 1 argument (2 given) I am using Python 2.3 on OS X. Ideas? -- http://mail.python.org/mailman/listinfo/python-list