Reputation: 10081
How do I do a deep copy of a python object using the C API? I know I can use copy.deepcopy, but I'd prefer to use the C API if I can.
Upvotes: 4
Views: 865
Reputation: 601789
The functionality of copy.deepcopy()
is completely written in Python. I don't think they would have done this if there was a single C call to achieve the same thing, so my guess is you will have to call copy.deepcopy()
.
Upvotes: 4