Initilizing MD lists w/ objects.
Philip Swartzleonard
starx at pacbell.net
Fri Apr 12 22:48:47 EDT 2002
I'm looking for a reasonable way to initilize a multidimensional list with
a bunch of blank objects of some type (already been burned by using [obj
()] * 400 or similar =). This is the best i've come up with, but it seems
icky:
self.data = [None]*40
for x in range(40):
self.data[x] = []
for y in range(40):
self.data[x].append(Vis_cell())
--
Philip Sw "Starweaver" [rasx] :: www.rubydragon.com
More information about the Python-list
mailing list