Return a destructive iterator over the heap's elements. Each time next is invoked, it pops the smallest item from the heap.
(self)
| 40 | return item |
| 41 | |
| 42 | def iterpop(self): |
| 43 | '''Return a destructive iterator over the heap's elements. |
| 44 | |
| 45 | Each time next is invoked, it pops the smallest item from the heap. |
| 46 | ''' |
| 47 | while self: |
| 48 | yield self.popmin() |
| 49 | |
| 50 | #---- overrided ListMixin methods ---------------------------------------- |
| 51 |