class MyFormatter(string.Formatter):

    def get_field(self, field_name, args, kwargs):
        return self.get_value(field_name, args, kwargs), field_name
python: dots in the name of variable in a format string