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

Re: func(*params)

2005-11-18 Thread David Duerrenmatt
er 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]]) -> value > > Call a callable object with positional arg

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 wh

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.o

func(*params)

2005-11-18 Thread David Duerrenmatt
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) Then, the list/tuple named params will automatically be "expanded" and n=len(params) arguments wi