Subject:dynamic function call | dynamic module importing Author:Yi Chen Date:18 Feb 2009 05:31 AM
Is there a way that we could invoke a function dynamically? For example, there are tons of functions. We are going to call one of those functions based on a parameter, such as function name.
Similarly, Can we import a module baseon on a parameter, such as module's namespace. Of course, it should be dynamic as well.
Both of above questions are because that I don't want to add tons of if-else clause to determine which function should be invoked.