Diez B. Roggisch
deets at nospam.web.de
Fri Oct 19 17:05:28 CEST 2007
> Python will not allow string to be used a function pointer. It is type
> unsafe. Best way is to convert string into function pointers manually.
> if dynamicMethod == 'bar':
> method = oFoo->bar
> method = oFoo->default
Sorry to say so, but that answer is bogus. It's not even Python!
Jarek has already shown how to solve this problem. And type-safety-issues
have nothing to do with it at all.
More information about the Python-list