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

Lib.Krakatau.ssa.constraints.mixin.py Maven / Gradle / Ivy

There is a newer version: 1.1
Show newest version
class ValueType(object):
    '''Define _key() and inherit from this class to implement comparison and hashing'''
    # def __init__(self, *args, **kwargs): super(ValueType, self).__init__(*args, **kwargs)
    def __eq__(self, other): return type(self) == type(other) and self._key() == other._key()
    def __ne__(self, other): return type(self) != type(other) or self._key() != other._key()
    def __hash__(self): return hash(self._key())   




© 2015 - 2025 Weber Informatics LLC | Privacy Policy