Static parameter count

Tertius Cronje Tertius.Cronje at postoffice.co.za
Thu Mar 17 04:52:31 EST 2005


> >         elif len(L) == 5:
> >             return struct.pack(fmt,L[0] , L[1], L[2], L[3], L[4])
> >         elif len(L) == 6:
> >             return struct.pack(fmt,L[0] , L[1], L[2], L[3], L[4],
L[5])
> >
> > 	# etc... etc... etc ...
> 
> return struct.pack(fmt, *L)
> 
> Should do the trick
> 
> ola
> 

Many thanks! It *did* the trick!

T



More information about the Python-list mailing list