[Doc-SIG] readability of sample programs in tutorial
Xuan Wu
fromwheretowhere.service at gmail.com
Sat May 12 16:11:56 EDT 2018
Hi Steve,
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:
> From 1986 till 1991 I was with the Amoeba project, headed by Sape
Mullender
Sape's phone back then at CWI was |+20-592 4139. |
After that I found another colleague of them is Jack Jansen, with phone
20 592 4098
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.
So, 'tel' seems to be a sample telephone book of CWI, with only the last
4 digits.
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.
Best,
Xuan.
On 5/11/18 9:40 AM, Xuan Wu wrote:
>
> Hi,
>
> 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:
>
> >>>tel = {'jack': 4098, 'sape': 4139}
> >>>tel['guido'] = 4127
> >>>tel
> {'sape': 4139, 'guido': 4127, 'jack': 4098}
> >>>tel['jack']
> 4098 ...
>
> 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.
>
> In general, I wonder if there was discussion of revising some sample
> programs for better readability or adding more comments/introductory
> texts?
>
> Thanks.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/doc-sig/attachments/20180512/10547cff/attachment.html>
More information about the Doc-SIG
mailing list