[docs] Explanation of deque

anatoly techtonik techtonik at gmail.com
Thu Mar 19 12:04:07 CET 2015


https://docs.python.org/2/library/collections.html#collections.deque

The documentation is detailed, descriptive, but.. it fails to answer
the main question - what is deque?

"Deques are a generalization of stacks and queues (the name is
pronounced “deck” and is short for “double-ended queue”). Deques
support thread-safe, memory efficient appends and pops from either
side of the deque with approximately the same O(1) performance in
either direction."

I must say that I came to the point where I don't get what that means.
Explaining the concept of double-ended queue or circular buffer with
words like "thread-safe" and "memory efficient" is not helpful.
-- 
anatoly t.


More information about the docs mailing list