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 r.david.murray
Recipients benjamin.peterson, maxlem, r.david.murray, rhettinger
Date 2009-08-18.21:13:39
SpamBayes Score 5.872192e-05
Marked as misclassified No
Message-id <1250630020.96.0.328222983381.issue6730@psf.upfronthosting.co.za>
In-reply-to
Content
The docs very clearly say the second argument is the value that will be
assigned to the keys.  It doesn't matter whether or not that object is
mutable, it is that object that gets assigned.  This is just the way
that Python works:

>>> a = b = []
>>> a.append(1)
>>> b.append(2)
>>> a
[1, 2]

That is exactly analogous to what you are doing in your example.
History
Date User Action Args
2009-08-18 21:13:41r.david.murraysetrecipients: + r.david.murray, rhettinger, benjamin.peterson, maxlem
2009-08-18 21:13:40r.david.murraysetmessageid: <1250630020.96.0.328222983381.issue6730@psf.upfronthosting.co.za>
2009-08-18 21:13:39r.david.murraylinkissue6730 messages
2009-08-18 21:13:39r.david.murraycreate