Is there a more elegant way to do this?

Kamilche klachemin at
Sat Jun 26 23:58:32 CEST 2004

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.parent, self.number,   \
                           self.x, self.y, self.z,  \
                 ,,, \
                           self.size, self.rotate, self.translucency)

More information about the Python-list mailing list