I am using a dictionary/get construct as a switch case in Python. It looks similar to this one:
def switch_function(pluginID, param):
switcher = {
'someid': somefunction(param),
}
return switch_function.get(pluginID, None)
However, i want to to extend the dictionary by another key value pair, which is defined in a conf file. I want a function head as an value. The function head should be the head of that function, which should be executed in the switch case, for a specific pluginid. The config file will look something like this:
[aSection]
pluginid='anotherid'
functionHead: anotherfunction2
Extending the dictionary should be easy, but is it possible to map a function head as an value inside a conf file?