[Tutor] Clearing the Deque • Picturing Python’s `deque` data structure
Mats Wichmann
mats at wichmann.us
Wed Nov 8 18:58:42 EST 2023
On 11/8/23 16:36, Alan Gauld via Tutor wrote:
> On 08/11/2023 20:27, dn via Tutor wrote:
>
>>>> *pronounced like “deck"
>>> New Zealand-style pronounciation?
>
>> Actually (a very English exclamation), Stephen is based in London!
>>
>> How would you like it pronounced?
>
> I've only ever heard it pronounced as Dee-Queue.
>
> Differentiated from deque in that it is a noun and not a verb.
> So context is sufficient. I've certainly never heard it called
> a deck!
It has a long history (for me) of being "deck", as that's what Knuth
proclaimed, and he was The God Of Computer Science when I was learning,
even if he was associated with a bitter-rival university (I studied at
UC Berkeley, and of course Knuth was Stanford).
I did some hunting and of course the excerpt is on the web - my books
are in a box somewhere, not seen for decades:
===
A deque ("double-ended queue") is a linear list for which all insertions
and deletions (and usually all accesses) are made at the ends of the
list. A deque is therefore more general than a stack or a queue; it has
some properties in common with a deck of cards, and it is pronounced the
same way.
===
And my joke question had to do with somewhat notorious way "deck" comes
out (to non-New Zealand / Aussie ears), parodied in a series of phony
ads as can be seen here:
https://www.youtube.com/watch?v=tm5Hne97BA4
More information about the Tutor
mailing list