A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-January/041860.html below:

[Python-Dev] collections module

[Python-Dev] collections module [Python-Dev] collections moduleJeremy Fincher fincher.8 at osu.edu
Fri Jan 9 13:09:07 EST 2004
On Jan 9, 2004, at 12:32 AM, Raymond Hettinger wrote:

> The second type would be a high speed queue implemented using
> linked list blocks like we used for itertools.tee().  The
> interface could be as simple as push, pop, and len.  Each
> operation ought to run about as fast a list assignment (meaning
> that it beats the heck out of the list.pop(0), list.append(data)
> version).

That's great, though I'd beg that the methods push/pop be named 
enqueue/dequeue.  I can imagine the confusion that would result from 
read code that used .pop() to clear out a queue -- people very possibly 
wouldn't be able to tell whether the data structure being used is a 
queue or a stack.

Jeremy


More information about the Python-Dev mailing list

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