

def __eq__(self, other):
    'Compare two entities of the same class for equality.'
    if (other.__class__ is not self.__class__):
        return NotImplemented
    if (self._key != other._key):
        return False
    return self._equivalent(other)

dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/model.py Model.__eq__/original