Skip to content
Snippets Groups Projects
Verified Commit 94d53f2b authored by Bertrand  NÉRON's avatar Bertrand NÉRON
Browse files

:pencil2: improve hint typing

parent 82745b47
No related branches found
No related tags found
No related merge requests found
...@@ -27,11 +27,11 @@ class Node: ...@@ -27,11 +27,11 @@ class Node:
_id = itertools.count(0) _id = itertools.count(0)
def __init__(self): def __init__(self) -> None:
self.id: int = next(self._id) self.id: int = next(self._id)
self.neighbors: Set['Node'] = set() self.neighbors: Set['Node'] = set()
def __hash__(self): def __hash__(self) -> int:
# to be usable in set an object must be hashable # to be usable in set an object must be hashable
# so we need to implement __hash__ # so we need to implement __hash__
# which must returm an int uniq per object # which must returm an int uniq per object
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment