Skip to content

Commit

Permalink
Rework Language.__hash__
Browse files Browse the repository at this point in the history
Close #19
  • Loading branch information
moi15moi authored and georgkrause committed Sep 9, 2024
1 parent a603607 commit 86a1475
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion langcodes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1501,7 +1501,7 @@ def __eq__(self, other):
return self._str_tag == other._str_tag

def __hash__(self) -> int:
return hash(id(self))
return hash(self._str_tag)

def __getitem__(self, key: str) -> Optional[Union[str, List[str]]]:
if key in self.ATTRIBUTES:
Expand Down

0 comments on commit 86a1475

Please sign in to comment.