[Tutor] "TypeError: 'int' object is not callable"??

Kent Johnson kent37 at tds.net
Fri Dec 17 12:00:08 CET 2004


Jacob S. wrote:
> Ha! That's what I was looking for! The builtin apply function! The only way
> I could send the *args to the function was through a list, and function
> calls see a list as one argument. The apply argument doesn't! Thanks Bob.

apply() is deprecated; it has been replaced by 'extended call syntax'. Instead of
   apply(fn, args, kwds)
you can now write
   fn(*args, **kwds)

Kent


More information about the Tutor mailing list