MCPcopy
hub / github.com/TheAlgorithms/Python / __init__

Method __init__

data_structures/queues/double_ended_queue.py:89–97  ·  view source on GitHub ↗
(self, iterable: Iterable[Any] | None = None)

Source from the content-addressed store, hash-verified

87 return val
88
89 def __init__(self, iterable: Iterable[Any] | None = None) -> None:
90 self._front: Any = None
91 self._back: Any = None
92 self._len: int = 0
93
94 if iterable is not None:
95 # append every value to the deque
96 for val in iterable:
97 self.append(val)
98
99 def append(self, val: Any) -> None:
100 """

Callers

nothing calls this directly

Calls 1

appendMethod · 0.95

Tested by

no test coverage detected