def __getattr__(self, item):
        """Maps values to attributes.
        Only called if there *isn't* an attribute with this name
        """
        try:
            return self.__getitem__(item)
        except KeyError:
            raise AttributeError(item)
Maps values to attributes.
        Only called if there *isn't* an attribute with this name
        
recipes/Python/389916_Example_setattr__getattr/recipe-389916.py