sourya varenya <souryavare...@gmail.com> added the comment:

Here's a sample run for reproducibility:
---
Python 3.6.9(Ubuntu 18.04) & 3.7.4(Windows)
---
>>> a = {1:{5:8},2:{5:8}}

>>> b = dict.fromkeys([1,2],{5:8})

>>> a
{1: {5: 8}, 2: {5: 8}}

>>> b
{1: {5: 8}, 2: {5: 8}}

>>> a[1].update({6:9})
>>> b[1].update({6:9})

>>> a
{1: {5: 8, 6: 9}, 2: {5: 8}}

>>> b
{1: {5: 8, 6: 9}, 2: {5: 8, 6: 9}}

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38934>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to