subclassing built-in types

Fredrik Lundh fredrik at pythonware.com
Mon May 24 17:23:52 EDT 2004


Gabriel Cooper wrote:

> Traceback (most recent call last):
>   File "<pyshell#205>", line 1, in -toplevel-
>     x = myString("hello",40)
> TypeError: str() takes at most 1 argument (2 given)

this might help:

http://www.python.org/2.2.3/descrintro.html#__new__

</F>







More information about the Python-list mailing list