<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</p>
Hi Steve,<br>
<br>
actually I suspected the same at the first sight, but after
realizing "Guido" is the creator, I dug the python source code
history and found out he actually drafted this sample himself around
1991. Then I found in his resume that:<br>
<br>
>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
From 1986 till 1991 I was with the Amoeba project, headed by Sape
Mullender<br>
<br>
Sape's phone back then at CWI was
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<code>+20-592 4139. </code><br>
After that I found another colleague of them is Jack Jansen, with
phone
<meta http-equiv="content-type" content="text/html; charset=utf-8">
20 592 4098<br>
And 20-592-4127 might be a shared phone number, as it was listed as
overall contact number in some of CWI's publications, so likely
Guido and Irv (not sure who that refers to, which bothers me a bit
still, but I can live with it) both used that at some time, which is
also shown in the sample program.<br>
<br>
So, 'tel' seems to be a sample telephone book of CWI, with only the
last 4 digits.<br>
<br>
The program's meaning becomes obvious only after all this history
study. It was fun for sure, but IMO most readers won't go that far,
as I didn't find any of such explanations online so far.<br>
<br>
Best,<br>
Xuan.<br>
<br>
<div class="moz-cite-prefix">On 5/11/18 9:40 AM, Xuan Wu wrote:<br>
</div>
<blockquote
cite="mid:bd88fd97-ce9a-2b7a-fff0-f134ea5bc491@gmail.com"
type="cite">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<p>Hi,</p>
<p>when reading some of the sample codes in the official tutorial,
I had to do research to understand the background of naming and
string constants, like those strings from the script of Monty
Python. Still this one in $5.5 is the most challenging so far:</p>
<p>
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
</p>
<pre><span class="gp">>>> </span><span class="n">tel</span> <span class="o">=</span> <span class="p">{</span><span class="s1">'jack'</span><span class="p">:</span> <span class="mi">4098</span><span class="p">,</span> <span class="s1">'sape'</span><span class="p">:</span> <span class="mi">4139</span><span class="p">}</span>
<span class="gp">>>> </span><span class="n">tel</span><span class="p">[</span><span class="s1">'guido'</span><span class="p">]</span> <span class="o">=</span> <span class="mi">4127</span>
<span class="gp">>>> </span><span class="n">tel</span>
<span class="go">{'sape': 4139, 'guido': 4127, 'jack': 4098}</span>
<span class="gp">>>> </span><span class="n">tel</span><span class="p">[</span><span class="s1">'jack'</span><span class="p">]</span>
<span class="go">4098
...
</span></pre>
<p>I did quite some digging to confirm my guess of the hidden
meaning, during which I realized it was initially written 27
years ago, without much change so far. Now I'm curious if its
meaning is obvious to most nowadays beginners even as English
speakers.</p>
<p>In general, I wonder if there was discussion of revising some
sample programs for better readability or adding more
comments/introductory texts?</p>
<p>Thanks.</p>
</blockquote>
<br>
</body>
</html>