Draft: Identity.__hash__ and Path.__hash__

This commit is contained in:
2022-05-09 17:39:48 +02:00
parent a0901a76de
commit 9517f53473
2 changed files with 6 additions and 0 deletions

View File

@@ -168,3 +168,6 @@ class Identity:
return False
return True
def hash(self) -> int:
return hash(str(self))

View File

@@ -94,3 +94,6 @@ class Path:
"""Check if path ends with sub"""
return self.path.endswith(sub)
def __hash__(self) -> int:
return hash(self.path)