[Tutor] Clearing the Deque • Picturing Python’s `deque` data structure
dn
PythonList at DancesWithMice.info
Wed Nov 8 20:12:58 EST 2023
On 09/11/2023 12.58, Mats Wichmann wrote:
> 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!
That was my introduction to the data-construct too. Which meant I
puzzled over the matter (overly philosophically) and concluded it was
another trans-Atlantic difference, ie it depended upon which
school/skool scheduled/skeduled your learning.
The speaker pronounces the term "deck" and it's his talk. So, I'm not
about to change his words.
Whilst I will happily coach others who are speaking for the first time,
or perhaps speaking for the first time, Stephen has considerable
experience. We are more interested in talking about 'approach' and
methodology to better 'connect' with each attendee.
Speaking personally: as the single-ended construct is called a "queue",
it seems more logical to retain that pronunciation in the double-ended
version. How does "deck" relate to [single-ended] "queue"? There's not
even a hint that they are related!
I guess we don't face such issues anywhere else. The European assumption
that "tuple" starts with a sound like "too", as distinct from others
preferring an "up"-like pronunciation is but a figment of our imaginations.
Perhaps we should ignore data-structures (and thus classes*) completely,
and just jump straight into writing the code...
* with this, on top of the sarcasm, @Alan knows I'm baiting him...
> 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.
> ===
The speed and efficiency of decks/deques, compared with standard lists
and much-favored stacks, is exactly the point that our speaker will be
making!
Everyone is welcome to come along to the (hybrid) meeting: Wednesday, 15
November 2023, 1815~2030 NZDT (0515~0730 UTC).
RSVP at https://www.meetup.com/nzpug-auckland/events/295433874/
(speaking of language, I noticed a tendency to say "Please RSVP" or
"Reply by RSVP-ing", which duplicates the meaning of the (originally
French) term RSVP - just as many folk talk of "PIN-numbers")
> 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
To confirm your opinion that I have no sense of humor (hah!), please
would you confirm reading my warning about people attempting to imitate
the New Zealand accent. The video-guy didn't! He sounds Dutch South
African (per that "ew" of tuple!) and when he came out with
"pro-duck-t", sealed his own can, um, fate!
Australians (and others) like to have a go at the Kiwi pronunciation of
"fish and chips" (BTW largely unknown in the US) as "fush and cheeps". I
have heard something of the first - yet it was from Kiwis who had spend
some time in Australia. I've lent my phonetic-ear to this claim, over
the years, and have never really heard it. Of course, like other
countries, there are regional variations in accent. The "cheeps" for
"chips" does give rise to the phrase "cheap as chips".
Kiwi-English is much more like English-English. Aussie-English is much
more American.
Let me know when you're coming-over. We'll say "gidday" (and not the
different, Australian, version) and see (and hear) the real deal! I'll
happily introduce you to words like "paua", and if you can pronounce it,
show you around "Wakarewarewa". How about "Waikaremoana" (or should we
let her walk?). Speaking of (silly) walks, must get back to (pronouncing
it) Python and a PUG meeting in the States (where during the set-up, the
MC had the politesse to check pronunciation of the speaker's Polish name
- he needed several tries to get it reasonably-correct. These things are
so much easier for those of us who are multi-lingual)!
--
Regards,
=dn
More information about the Tutor
mailing list