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 pyry.saila
Recipients pyry.saila
Date 2010-09-03.02:57:00
SpamBayes Score 0.006261716
Marked as misclassified No
Message-id <1283482623.34.0.524181543079.issue9749@psf.upfronthosting.co.za>
In-reply-to
Content
As I am new to Python and programming as a whole, I do not have extensive knowledge of how to correctly report a bug. And as such I must apologize for the inconvenience.

My lack of knowledge makes this only an assumption, but...

---

>>>l
[(1, 4, 7), (2, 5, 8), (3, 6, 9)]
>>>q = r = s = []
>>>for i in range(len(l)):
...    for x in l[i]:
...        q.append(x)
...    s = q
...    q = []
...    print s,    # print used to increase clarity
...    r.append(s)
...    print r    # and the next is printed out as:
...
[1, 4, 7] [1, 4, 7, [...]]
[2, 5, 8] [1, 4, 7, [...], [2, 5, 8]]
[3, 6, 9] [1, 4, 7, [...], [2, 5, 8], [3, 6, 9]]
>>>r
[1, 4, 7, [...], [2, 5, 8], [3, 6, 9]]
>>>r[3]    # for extra
[1, 4, 7, [...], [2, 5, 8], [3, 6, 9]]

---

Supposed outcome for r being [[1, 4, 7], [2, 5, 8], [3, 6, 9]]
History
Date User Action Args
2010-09-03 02:57:03pyry.sailasetrecipients: + pyry.saila
2010-09-03 02:57:03pyry.sailasetmessageid: <1283482623.34.0.524181543079.issue9749@psf.upfronthosting.co.za>
2010-09-03 02:57:01pyry.sailalinkissue9749 messages
2010-09-03 02:57:00pyry.sailacreate