deepcopy chokes with TypeError on dynamically assigned instance method

Kanenas kanenas at tcomcastd.tnet
Thu Feb 10 19:59:17 EST 2005


On Thu, 10 Feb 2005 00:54:04 -0800, Kanenas <kanenas @t comcast d.t
net> wrote:

>When an instance has a dynamically assigned instance method, deepcopy
>throws a TypeError with the message "TypeError: instancemethod
>expected at least 2 arguments, got 0".  

I forgot to mention that the TypeError is thrown only when
constructing an instance from another instance in the same class, e.g.
Foo('bar') is fine but Foo(Foo('bar')) will fail.



More information about the Python-list mailing list