def to_dict(self):
        """
        Get a dictionary of the attributes of this Language object, which
        can be useful for constructing a similar object.
        """
        if self._dict is not None:
            return self._dict

        result = {}
        for key in self.ATTRIBUTES:
            value = getattr(self, key)
            if value:
                result[key] = value
        self._dict = result
        return result
def to_dict ( self ) : if self . _dict is not None : return self . _dict result = { } for key in self . ATTRIBUTES : value = getattr ( self , key ) if value : result [ key ] = value self . _dict = result return result
Get a dictionary of the attributes of this Language object, which
        can be useful for constructing a similar object.