Skip to content

Commit 454eded

Browse files
committed
document falsy item
1 parent 2bee459 commit 454eded

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: data_structures/hashing/hash_map.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ def _try_set(self, ind: int, key: KEY, val: VAL) -> bool:
7272
7373
If bucket is empty or key is the same, does insert and return True.
7474
75-
If bucket has another key or deleted placeholder,
76-
that means that we need to check next bucket.
75+
If bucket has another key that means that we need to check next bucket.
7776
"""
7877
stored = self._buckets[ind]
7978
if not stored:
79+
# A falsy item means that is None (bucket never used) or _deleted.
8080
self._buckets[ind] = _Item(key, val)
8181
self._len += 1
8282
return True

0 commit comments

Comments
 (0)