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 xintx-ua
Recipients xintx-ua
Date 2011-07-20.16:38:58
SpamBayes Score 4.3200285e-05
Marked as misclassified No
Message-id <1311179939.37.0.721562945719.issue12597@psf.upfronthosting.co.za>
In-reply-to
Content
Next code:

def ill(row):
  row[1]=1
list_manual=[[0,0,0],[0,0,0],[0,0,0]]
list_generated=[[0,0,0]]*3
ill(list_manual[1])
print(list_manual)
ill(list_generated[1])
print(list_generated)

Will output:

[[0, 0, 0], [0, 1, 0], [0, 0, 0]]
[[0, 1, 0], [0, 1, 0], [0, 1, 0]]

Is it a bug?
History
Date User Action Args
2011-07-20 16:38:59xintx-uasetrecipients: + xintx-ua
2011-07-20 16:38:59xintx-uasetmessageid: <1311179939.37.0.721562945719.issue12597@psf.upfronthosting.co.za>
2011-07-20 16:38:58xintx-ualinkissue12597 messages
2011-07-20 16:38:58xintx-uacreate