From: "Tim Peters" <tim.one@comcast.net> > If you want simpler names, I'm finding this little module quite pleasant to > use: > > """ > import heapq > > class Heap(list): > def __init__(self, iterable=[]): > self.extend(iterable) > push = heapq.heappush > popmin = heapq.heappop > replace = heapq.heapreplace > heapify = heapq.heapify > """ And perhaps: def __iter__(self): while True: yield self.popmin() Raymond Hettinger
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