Sushant wrote:

> 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
> else:
>     method = oFoo->default
> method()

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. 

Diez
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to