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 ): output_vars = [] for each in *args: <<< build a list of output values >>> return <<< the tuple equivalent of this list >>> ip, meat, zipcode = unpack_struct( "192.168.001.001Ham22132", 15, 3, 5 ) Thanks, Roger. -- http://mail.python.org/mailman/listinfo/python-list