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

Method __iter__

data_structures/queues/linked_queue.py:49–53  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

47 self.rear: Node | None = None
48
49 def __iter__(self) -> Iterator[Any]:
50 node = self.front
51 while node:
52 yield node.data
53 node = node.next
54
55 def __len__(self) -> int:
56 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected