def __getattr__(self, attribute):
        """
        Returns given attribute value.

        :return: Attribute value.
        :rtype: object
        """

        try:
            return dict.__getitem__(self, attribute)
        except KeyError:
            raise AttributeError("'{0}' object has no attribute '{1}'".format(self.__class__.__name__, attribute))
def __getattr__ ( self , attribute ) : try : return dict . __getitem__ ( self , attribute ) except KeyError : raise AttributeError ( "'{0}' object has no attribute '{1}'" . format ( self . __class__ . __name__ , attribute ) )
Returns given attribute value.

        :return: Attribute value.
        :rtype: object