Loading select queries into objects

Graham Ashton graham at coms.com
Mon Jun 18 11:11:08 EDT 2001


In article <u3d8x295d.fsf at cs.uu.nl>, "Unknown" <piet at cs.uu.nl> wrote:

> That is, if I understand how you want to do it:
>         The list of functions is [f0, f1, f2] and you want: f0(tup[0])
>         f1(tup[1])
>         f2(tup[2])
> 
> You could do something like:
> funlist = (self.column1, self.column2, self.some_column)
> 
> for i in range (len(funlist)):
>         apply(funlist[i],(tup[i],))

That's done the job. Thanks very much.



More information about the Python-list mailing list