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 Bastiaan Albarda
Recipients Bastiaan Albarda, dechamps, zorceta
Date 2015-07-08.09:53:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1436349204.33.0.219365485704.issue24589@psf.upfronthosting.co.za>
In-reply-to
Content
The * operator lets you use the same object multiple times, thereby saving resources. 

If you want unique objects use comprehension:
>>> v = [[] for x in range(10)]
>>> v[3].append(3)
>>> v
[[], [], [], [3], [], [], [], [], [], []]
>>> v[3] += [3]
>>> v
[[], [], [], [3, 3], [], [], [], [], [], []]
History
Date User Action Args
2015-07-08 09:53:24Bastiaan Albardasetrecipients: + Bastiaan Albarda, zorceta, dechamps
2015-07-08 09:53:24Bastiaan Albardasetmessageid: <1436349204.33.0.219365485704.issue24589@psf.upfronthosting.co.za>
2015-07-08 09:53:24Bastiaan Albardalinkissue24589 messages
2015-07-08 09:53:24Bastiaan Albardacreate