What would be the best technique to 'unpack' the list? Would this best be done in the initializer method of the class or would it be better to do this before the creating the object and pass the arguments in a non-list format? I ask because the lists contains information relating to the object which will be used by the class.

Also I would like each object to have a unique name, What should I do for that? Would it best be use to one of the values in the list?

Thank you, this is exactly what I was looking for! Although I'm still not 100% sure how this works.
–
SheldonMay 27 '11 at 15:27

2

@Sheldon - Which parts? List Comprehensions are worthwhile reading if the [x for x in y] syntax is throwing you off. Once you've wrapped your head around those the next idea used here is that I'm unpacking the inner lists to pass them to the constructor for myClass. That's where myClass(*vals) comes in. HTH.
–
g.d.d.cMay 27 '11 at 16:09