def __eq__(self, other):
        if not isinstance(other, Key):
            return False

        if self.is_partial or other.is_partial:
            return False

        return (self.flat_path == other.flat_path and
                self.project == other.project and
                self.namespace == other.namespace)
Compare two keys for equality.
dataset/ETHPy150Open GoogleCloudPlatform/gcloud-python/gcloud/datastore/key.py/Key.__eq__