>>> queue = LinkedQueue() >>> for i in range(1, 4): ... queue.put(i) >>> queue.put("Python") >>> queue.put(3.14) >>> queue.put(True) >>> str(queue) '1 <- 2 <- 3 <- Python <- 3.14 <- True'
(self)
| 68 | return len(tuple(iter(self))) |
| 69 | |
| 70 | def __str__(self) -> str: |
| 71 | """ |
| 72 | >>> queue = LinkedQueue() |
| 73 | >>> for i in range(1, 4): |
| 74 | ... queue.put(i) |
| 75 | >>> queue.put("Python") |
| 76 | >>> queue.put(3.14) |
| 77 | >>> queue.put(True) |
| 78 | >>> str(queue) |
| 79 | '1 <- 2 <- 3 <- Python <- 3.14 <- True' |
| 80 | """ |
| 81 | return " <- ".join(str(item) for item in self) |
| 82 | |
| 83 | def is_empty(self) -> bool: |
| 84 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected