YA-Newbie: Progress (but still baffled by deepcopy/pickle issues...:)

Fred Pacquier fredp at multimania.com.nospam
Sun Oct 3 16:26:22 EDT 1999


greg at cosc.canterbury.ac.nz said :

>> Maybe, yes. I have a hunch it may be a problem in the wxWindows/wxPython
>> interface, in which case it's probably hard to find.
>
>In any case, since you don't want the bitmaps to be
>copied by deepcopy, referring to them indirectly is
>the correct thing to do.

Thanks for the confirmation. This method does indeed work without problems, 
and I guess it also will when I get to the 'pickle' part again...

>Alternatively, don't use deepcopy at all, and write your
>own custom copier that copies just what you want. I
>usually prefer to steer clear of deepcopy because of
>its propensity for copying too much.

With the new version I now know exactly what is being duplicating, so it 
won't be necessary this time, but it's certainly worth keeping in mind for 
the future. This experience made me realize that by including a reference to 
a wxWindows/Python object in mine, I actually had no idea what sort of things 
were being copied, or to what level. And maybe it's better that I didn't 
know... :-)

-- 
YAFAP : http://www.multimania.com/fredp/




More information about the Python-list mailing list