Problem using copy.copy with my own class
Michael Torrie
torriem at gmail.com
Wed Apr 23 23:32:37 EDT 2008
Jeffrey Barish wrote:
> Marc 'BlackJack' Rintsch wrote:
>> Please simplify the code to a minimal example that still has the problem
>> and *show it to us*. It's hard to spot errors in code that nobody except
>> you knows.
>
> Here it is:
>
> import copy
>
> class Test(int):
> def __new__(cls, arg1, arg2):
^^^^^^^
The exception is saying that copy.copy is not providing this 3rd
argument. I might be a bit dense, but what would arg2 be for? Isn't
arg1 supposed to be the object instance you are copying from? If so,
arg2 is superfluous.
More information about the Python-list
mailing list