Check if the heap is not empty. >>> sh = SkewHeap() >>> bool(sh) False >>> sh.insert(1) >>> bool(sh) True >>> sh.clear() >>> bool(sh) False
(self)
| 123 | self.insert(item) |
| 124 | |
| 125 | def __bool__(self) -> bool: |
| 126 | """ |
| 127 | Check if the heap is not empty. |
| 128 | |
| 129 | >>> sh = SkewHeap() |
| 130 | >>> bool(sh) |
| 131 | False |
| 132 | >>> sh.insert(1) |
| 133 | >>> bool(sh) |
| 134 | True |
| 135 | >>> sh.clear() |
| 136 | >>> bool(sh) |
| 137 | False |
| 138 | """ |
| 139 | return self._root is not None |
| 140 | |
| 141 | def __iter__(self) -> Iterator[T]: |
| 142 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected