P
Paradox
I would like to call a function whose name I supply at runtime.
Something like this but it didn't work
functionName = 'run'
instance = ClassDef()
args = [1, 2]
#want the dynamic equivalant of
#instance.run(*args)
#This didn't work cause there was no __call__ attribute. Why?
value = instance.__call__[functionName](*args)
Thanks Joey
Something like this but it didn't work
functionName = 'run'
instance = ClassDef()
args = [1, 2]
#want the dynamic equivalant of
#instance.run(*args)
#This didn't work cause there was no __call__ attribute. Why?
value = instance.__call__[functionName](*args)
Thanks Joey