This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Aditya Sane
Recipients Aditya Sane
Date 2019-04-24.19:49:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1556135397.5.0.612221590326.issue36715@roundup.psfhosted.org>
In-reply-to
Content
When initializing a dictionary with dict.fromkeys, if an object is used as initial value, then the value is taken by reference instead of by value.
This results in incorrect behavior since Python doesn't have "by reference" or pointers by default.
Attached file shows an example and one work-around.
History
Date User Action Args
2019-04-24 19:49:57Aditya Sanesetrecipients: + Aditya Sane
2019-04-24 19:49:57Aditya Sanesetmessageid: <1556135397.5.0.612221590326.issue36715@roundup.psfhosted.org>
2019-04-24 19:49:57Aditya Sanelinkissue36715 messages
2019-04-24 19:49:57Aditya Sanecreate