K
Kamilche
'''
Is there a more elegant way of doing this?
I would like to have the arguments to pack
automatically taken from lst.
'''
def pack(self):
lst = ['id', 'parent', 'number', 'x', 'y', 'z', 'red', \
'green', 'blue', 'size', 'rotate', 'translucency']
return struct.pack('<IIIiiiBBBHHH', \
self.id, self.parent, self.number, \
self.x, self.y, self.z, \
self.red, self.green, self.blue, \
self.size, self.rotate, self.translucency)
Is there a more elegant way of doing this?
I would like to have the arguments to pack
automatically taken from lst.
'''
def pack(self):
lst = ['id', 'parent', 'number', 'x', 'y', 'z', 'red', \
'green', 'blue', 'size', 'rotate', 'translucency']
return struct.pack('<IIIiiiBBBHHH', \
self.id, self.parent, self.number, \
self.x, self.y, self.z, \
self.red, self.green, self.blue, \
self.size, self.rotate, self.translucency)