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

Method __iter__

data_structures/queues/double_ended_queue.py:63–68  ·  view source on GitHub ↗

>>> our_deque = Deque([1, 2, 3]) >>> iterator = iter(our_deque)

(self)

Source from the content-addressed store, hash-verified

61 self._cur = cur
62
63 def __iter__(self) -> Deque._Iterator:
64 """
65 >>> our_deque = Deque([1, 2, 3])
66 >>> iterator = iter(our_deque)
67 """
68 return self
69
70 def __next__(self) -> Any:
71 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected