deepcopy

How can I debug a problem calling Python's copy.deepcopy() against a custom type?

In my code I'm trying to take copies of instances a class using copy.deepcopy. The problem is that under some circumstances it is erroring with the following error: TypeError: 'object.__new__(NotImplementedType) is not safe, use NotImplementedType.__new__()' After much digging I have found that I am able to reproduce the error using ...

Flex: DeepCopy of FileReference

Hi, in my project, I let users pick pictures using the FileReference class. I then load these pictures into their .data properties, using the load() function. After this I perform some local manipulation and send them to the server. What I would like to do, is to be able to iterate over the picked FileReferences again, load them into ....

deepcopy and python - tips to avoid using it?

Hi, I have a very simple python routine that involves cycling through a list of roughly 20,000 latitude,longitude coordinates and calculating the distance of each point to a reference point. def compute_nearest_points( lat, lon, nPoints=5 ): """Find the nearest N points, given the input coordinates.""" points = session.query...

Creating a deep copy method, Java

I want to make a deep copy method. I seeked help here the other day with this issue, but that was for a copy constructor. Now I need a regular method. I have the code created (nonworking), but I'm just not understanding it completely. public GhostList deepCopy(){ int length=this.getLength(); GhostList jadeed=new GhostLis...