$ python ./mytest.py
before deepcopy
f1 is f: True
f1 == f: True
after deepcopy
f1 is f: False
f1 == f: True
$ cat mytest.py
#!/usr/bin/python
import copy
f = {'a': {'b': {'c': {1}}}}
f1 = f
print("before deepcopy")
print("f1 is f: %s" % (f1 is f))
print("f1 == f: %s" % (f1 == f))
f = copy.deepcopy(f)
print("after deepcopy")
print("f1 is f: %s" % (f1 is f))
print("f1 == f: %s" % (f1 == f))
--
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/305137
Your team cloud init development team is requested to review the proposed merge
of ~smoser/cloud-init:bug/1621180 into cloud-init:master.
_______________________________________________
Mailing list: https://launchpad.net/~cloud-init-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~cloud-init-dev
More help : https://help.launchpad.net/ListHelp