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

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

There is a newer version: 7.9.0
Show newest version
    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other

    def __setattr__(self, attr, value):
        """set the value of an attribute using dot notation: `instance.attr = val`"""
        self[attr] = value

    def __getattr__(self, attr):
        """get the value of an attribute using dot notation: `instance.attr`"""
        return self.{{#attrNoneIfUnset}}get{{/attrNoneIfUnset}}{{^attrNoneIfUnset}}__getitem__{{/attrNoneIfUnset}}(attr)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy