newbie question: apply()

TK tokauf at web.de
Sat Oct 4 05:44:08 EDT 2008


> pos_args = ["spam", 1, [3]]
> kwd_args = {"b":7, "c":9}
> result = some_function(*pos_args, **kwd_args)
> 
> Which is equivalent to:
> result = some_function("spam", 1, [3], b=7, c=9)
> 
> Which was equivalent to:
> result = apply(some_function, pos_args, kwd_args)

Thanks a lot.

o-o

Thomas



More information about the Python-list mailing list