Hello Raymond, On Sat, Jun 12, 2004 at 04:38:56AM -0400, Raymond Hettinger wrote: > def heapiter(heap): > "Return a destructive iterator over the heap's elements, > smallest-to-largest" Is there a reason why the heap cannot simply be made iterable? The suggested heapiter() is destructive, but e.g. sys.stdin is also destructively iterable, so that would not be unprecedented. Alternatively, would a non-destructive algorithm be significantly slower or bad for some other reason? Armin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4