def __call__(self, fieldname, value):
    getattr(self, fieldname, self._default)(value)
transformtable = TransformTable()
transformtable(fieldname, value)
Dictionary based switch-like statement with actions