Computing a function name from another function name
问题 In python 3.4, I want to be able to do a very simple dispatch table for testing purposes. The idea is to have a dictionary with the key being a string of the name of the function to be tested and the data item being the name of the test function. For example: myTestList = ( "myDrawFromTo", "myDrawLineDir" ) myTestDict = { "myDrawFromTo": test_myDrawFromTo, "myDrawLineDir": test_myDrawLineDir } for myTest in myTestList: result = myTestDict[myTest]() The idea is that I have a list of function