Returning a variable number of things...

2009-02-06 Thread r0g
Hi There, I have a function that uses *args to accept a variable number of parameters and I would like it to return a variable number of objects. I could return a list but I would like to take advantage of tuple unpacking with the return values e.g. def unpack_struct( a_string, *args ):

Re: Returning a variable number of things...

2009-02-06 Thread Chris Rebert
On Fri, Feb 6, 2009 at 10:50 AM, r0g aioe@technicalbloke.com wrote: Hi There, I have a function that uses *args to accept a variable number of parameters and I would like it to return a variable number of objects. I could return a list but I would like to take advantage of tuple

Re: Returning a variable number of things...

2009-02-06 Thread Stephen Hansen
On Fri, Feb 6, 2009 at 10:50 AM, r0g aioe@technicalbloke.com wrote: Hi There, I have a function that uses *args to accept a variable number of parameters and I would like it to return a variable number of objects. I could return a list but I would like to take advantage of tuple

Re: Returning a variable number of things...

2009-02-06 Thread r0g
Chris Rebert wrote: On Fri, Feb 6, 2009 at 10:50 AM, r0g aioe@technicalbloke.com wrote: Hi There, I have a function that uses *args to accept a variable number of parameters and I would like it to return a variable number of objects. I could return a list but I would like to take