[issue41484] Overriding dictionary value under wrong key.

Ronald Oussoren report at bugs.python.org
Wed Aug 5 04:34:13 EDT 2020


Ronald Oussoren <ronaldoussoren at mac.com> added the comment:

This is expected behaviour. the assessment to retProduct[productKey] is not a copy. If those variants have the same parent and a different color you'll end up with a baseProduct where 'variants' refers to the same variant dict (and the second color seen will overwrite the value of 'variants')

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41484>
_______________________________________


More information about the Python-bugs-list mailing list