All Downloads are FREE. Search and download functionalities are using the official Maven repository.

python.model_templates.methods_tostr_eq_simple.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
    def to_str(self):
        """Returns the string representation of the model"""
        return str(self.value)

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, self.__class__):
            return False

        this_val = self._data_store['value']
        that_val = other._data_store['value']
        types = set()
        types.add(this_val.__class__)
        types.add(that_val.__class__)
        vals_equal = this_val == that_val
        return vals_equal




© 2015 - 2024 Weber Informatics LLC | Privacy Policy