Re: func(*params)

2005-11-20 Thread Fredrik Lundh
David Duerrenmatt wrote: > For some reasons, I've to use Python 1.5.2 and am looking for a workaround: > > In newer Python versions, I can call a function this way: > > func = some_function > func(*params) > > Then, the list/tuple named params will automatically be "expanded" and > n=len(params) a

Re: func(*params)

2005-11-18 Thread David Duerrenmatt
Great, this is exactly what I was looking for. Thanks all of you for your immediate answer! Nick Smallbone schrieb: > David Duerrenmatt wrote: > >>Hi there >> >>For some reasons, I've to use Python 1.5.2 and am looking for a workaround: >> >>In newer Python versions, I can call a function thi

Re: func(*params)

2005-11-18 Thread Nick Smallbone
David Duerrenmatt wrote: > Hi there > > For some reasons, I've to use Python 1.5.2 and am looking for a workaround: > > In newer Python versions, I can call a function this way: > > func = some_function > func(*params) > I think the "apply" function is what you want: apply(object[, args[, kwargs]

Re: func(*params)

2005-11-18 Thread Peter Otten
David Duerrenmatt wrote: > For some reasons, I've to use Python 1.5.2 and am looking for a > workaround: > > In newer Python versions, I can call a function this way: > > func = some_function > func(*params) Use apply(func, params) Peter -- http://mail.python.org/mailman/listinfo/python-l