[EMAIL PROTECTED] wrote:
> I'd like to create objects on the fly from a pointer to the class
> using: instance = klass() But I need to be able to pass in variables
> to the __init__ method. I can recover the arguments using the
> inspect.argspec, but how do I call __init__ with a list of argu
you can call a function with arglist like this:
def dummy(a, b, c):
print a + b, c
args = [1, 2, "hello"]
dummy(*args)
On Tue, Mar 25, 2008 at 5:38 PM, <[EMAIL PROTECTED]> wrote:
> I'd like to create objects on the fly from a pointer to the class
> using: instance = klass() But I need to
I'd like to create objects on the fly from a pointer to the class
using: instance = klass() But I need to be able to pass in variables
to the __init__ method. I can recover the arguments using the
inspect.argspec, but how do I call __init__ with a list of arguments
and have them unpacked to