Message99266
| Author |
sledge76 |
| Recipients |
sledge76 |
| Date |
2010年02月12日.14:52:31 |
| SpamBayes Score |
0.012896228 |
| Marked as misclassified |
No |
| Message-id |
<1265986353.37.0.770575922393.issue7917@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
This shows unexpected behavior.
>>> data2 = [[]] * 4
>>> print data2
[[], [], [], []]
>>> data2[0] += [(0,1)]
>>> print data2
[[(0, 1)], [(0, 1)], [(0, 1)], [(0, 1)]]
I added a tuple to only 0th list, but it got added to all the lists in the global list. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2010年02月12日 14:52:33 | sledge76 | set | recipients:
+ sledge76 |
| 2010年02月12日 14:52:33 | sledge76 | set | messageid: <1265986353.37.0.770575922393.issue7917@psf.upfronthosting.co.za> |
| 2010年02月12日 14:52:32 | sledge76 | link | issue7917 messages |
| 2010年02月12日 14:52:31 | sledge76 | create |
|