cloudant / python-cloudant

A Python library for Cloudant and CouchDB
Apache License 2.0
163 stars 55 forks source link

Some how I am getting a weakreference #495

Closed Mradr closed 3 years ago

Mradr commented 3 years ago

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 commented 3 years ago

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.