Greetings,
After reading everyone's comments and doing a little more research, I
re-implemented my function as a callable class.
def __call__(self, key, value):
if key not in self._methods:
return value
return self._methods[key](value)
This behaves like my previous function, solved the problem that I had
with the dictionary, the dictionary is created only once, a half dozen
functions got moved into the new class, and the old class now has less
clutter.
Thanks everyone!
Chris R.
--
https://mail.python.org/mailman/listinfo/python-list