Dmitry Kazakov <[email protected]> added the comment:
This is not a bug in Python. Refer to this page for the explanation:
https://stackoverflow.com/questions/240178/list-of-lists-changes-reflected-across-sublists-unexpectedly
Basically, [{}]*3 creates a list with three references to the same dictionary.
----------
nosy: +vaultah
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue32194>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com