I have a class in python that allows me to save a function (in a database) for later use. Now I need to have a method in the class that allows me to call this function on some arguments. Since I don't know how many arguments the function has ahead of time, I have to pass them in as list. This is where things fall apart because I can't find any way to get the argument to take its arguments from the tuple. In LISP this is very easy, since there's a keyword (well just one character) '@' for exactly this purpose:
(defmacro (call function arguments)
`(,function ,@args))
Does python do this and I've just missed it somehow? And if it doesn't, does anyone have a creative solution?
(apply function arguments)in Lisp (any dialect of Lisp, in fact). No macros necessary in this case.