def __getattr__(self, attr):
        """Allow access to the stored data through attributes."""
        try:
            return self.data[attr]
        except KeyError:
            message = "{!r} object has no attribute {!r}"
            raise AttributeError(message.format(type(self).__name__, attr))
def __getattr__ ( self , attr ) : try : return self . data [ attr ] except KeyError : message = "{!r} object has no attribute {!r}" raise AttributeError ( message . format ( type ( self ) . __name__ , attr ) )
Allow access to the stored data through attributes.