Lately I've been writing a lot of code involving the creation of new objects, and I quickly come to find that Python almost always creates a reference to an object instead of a new object. I understand the importance of conserving memory usage, but in this instance I actually need a true copy.
My problem is that I have yet to find anything in Python that can quickly generate a true copy of all objects. I am aware of the copy module, but it will not copy certain objects I need to copy. I have had some success experimenting with creating a new, blank object and initializing it to be the same as another object, but this is a sometimes lengthy and complex process. My question is if there is a feature that allows programmers to easily copy objects using a simple assignment.
Python is a good language, but it seems like its lacking an intuitive way to copy objects.
Edited 6 Years Ago by lrh9: n/a