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

Method __init__

other/lru_cache.py:212–218  ·  view source on GitHub ↗
(self, capacity: int)

Source from the content-addressed store, hash-verified

210 """
211
212 def __init__(self, capacity: int):
213 self.list: DoubleLinkedList[T, U] = DoubleLinkedList()
214 self.capacity = capacity
215 self.num_keys = 0
216 self.hits = 0
217 self.miss = 0
218 self.cache: dict[T, DoubleLinkedListNode[T, U]] = {}
219
220 def __repr__(self) -> str:
221 """

Callers

nothing calls this directly

Calls 1

DoubleLinkedListClass · 0.70

Tested by

no test coverage detected