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 Andrew.Hays, benjamin.peterson, r.david.murray
Date 2010-02-01.11:56:32
SpamBayes Score 0.00025169287
Marked as misclassified No
Message-id <1265025394.85.0.0894113623091.issue7823@psf.upfronthosting.co.za>
In-reply-to
Content
I'm not quite sure from what you wrote if you understood.  Just to make sure no one reading this ticket later gets confused: it works the same way for all objects, and the behavior that sometimes surprises people shows up with mutable objects.  So lists and dicts behave the same way in this scenario:

>>> x = [[]]*3
>>> x
[[], [], []]
>>> x[0].append(1)
>>> x
[[1], [1], [1]]
History
Date User Action Args
2010-02-01 11:56:35r.david.murraysetrecipients: + r.david.murray, benjamin.peterson, Andrew.Hays
2010-02-01 11:56:34r.david.murraysetmessageid: <1265025394.85.0.0894113623091.issue7823@psf.upfronthosting.co.za>
2010-02-01 11:56:33r.david.murraylinkissue7823 messages
2010-02-01 11:56:32r.david.murraycreate