Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Some how I am getting a weakreference #495

Closed
Mradr opened this issue Apr 20, 2021 · 1 comment
Closed

Some how I am getting a weakreference #495

Mradr opened this issue Apr 20, 2021 · 1 comment

Comments

@Mradr
Copy link

Mradr commented Apr 20, 2021

More of a general question. Looks like calling dict( object ) or { **object } still keeps weakreference or a reference back to the document object. I was wondering, what is the proper method to copy the data without it updating back to the document object so changes do not effect the original object?

@eiri
Copy link
Member

eiri commented Apr 20, 2021

In general using deepcopy from copy lib seems to be a way to dealing with collections that are mutable or contain mutable items.

For general python questions I'd suggest to use knowledge forums like https://stackoverflow.com, you'll get much more complete answers there, and reserve this repo's issues for technical queries specific to python-cloudant lib.

@eiri eiri closed this as completed Apr 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants