Using multiple "*"-style arguments

Dave Opstad dave.opstad at agfamonotype.com
Fri Jun 18 16:39:37 CEST 2004


In article <C2DAc.2081$OB3.55 at bgtnsc05-news.ops.worldnet.att.net>,
 "Andrew Koenig" <ark at acm.org> wrote:

> Does this do what you want?
> 
>     x = struct.pack((">HhhhhhhHHHL", i, *(bounds + b[0:2] + b[6:9] +
> [len(s)]))

No, unfortunately, because the arguments in the bounds and b lists are 
numeric, so adding them isn't the right thing.

But thanks for the suggestion!
Dave



More information about the Python-list mailing list