MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / __repr__

Method __repr__

data_structures/hashing/hash_map.py:317–321  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

315 yield from (item.key for item in self._buckets if item)
316
317 def __repr__(self) -> str:
318 val_string = ", ".join(
319 f"{item.key}: {item.val}" for item in self._buckets if item
320 )
321 return f"HashMap({val_string})"
322
323
324if __name__ == "__main__":

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected