On Sun, Apr 20, 2003 at 05:16:01AM -0400, Jeremy Fincher wrote: > 2.3 seems to focus somewhat on adding a wider variety of data structures to > Python -- well, sets and heapq, at least :) One thing I've found lacking, > though, is a nice O(1) FIFO queue -- even the standard Queue module I actually just wrote a modification to Queue that is O(1). There's no change to the interface, so it doesn't require adding a new data structure. I have the code here: http://www.cs.uoregon.edu/~agthorr/Queue.py The only changes are near the bottom of the file, beginning with the _init() function. My implementation uses Python lists, but it uses them in a smarter way than the existing Queue implementation. I'll submit a patch to SourceForge in a day or two. -- Agthorr
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