Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions rdflib/term.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ class IdentifiedNode(Identifier):

__slots__ = ()

def __hash__(self) -> int:
return super().__hash__()

def __eq__(self, other: Any) -> bool:
if isinstance(other, IdentifiedNode):
return self.n3() == other.n3() # compare the N3 notation and not the string representation
return super().__eq__(other)

def n3(self, namespace_manager: NamespaceManager | None = None) -> str:
raise NotImplementedError()

Expand Down
Loading