[docs] Bugs in Tutorial for Python 3.6.2. Section 4.4 (p. 19)

Hendra Soetjahja hendras at yahoo.com
Wed Jul 26 23:33:54 EDT 2017


Hi Zachary,
Right you are.
I need a reading glasses or get more sleep to see the indentation correctly  :)I suppose it's C/C++ programmer cognitive perception/dissonance that else goes with the if, not with for.We just glance it and started running the algo with if-else pairing in our head.It's like sleight of hand magic tricking our cognitive 'expectation' based on C/C++ experience.

You probably know it immediately when I copied the code with incorrect indentation in my email.

Thanks,  Hendra  ----------------------------------------------------------------------------------
This message with its attachment(s) are confidential, restricted, proprietary, and only for the originally addressed recipient(s). If you are not among the intended recipient(s), you are obligated to destroy this message immediately without using, sharing, disclosing, copying, distributing, or archiving it. Anyone acting otherwise will be responsible for any ramification that may arise from the unauthorized usage or distribution of this message. The sender is not liable for any loss or damage arising in any way from this message or its attachment(s). By messaging with the sender you consent to the aforementioned terms.
----------------------------------------------------------------------------------

      From: Zachary Ware <zachary.ware+pydocs at gmail.com>
 To: "docs at python.org" <docs at python.org> 
Cc: Hendra Soetjahja <hendras at yahoo.com>
 Sent: Wednesday, July 26, 2017 10:53 PM
 Subject: Re: [docs] Bugs in Tutorial for Python 3.6.2. Section 4.4 (p. 19)
   
Hi Hendra,

On Wed, Jul 26, 2017 at 6:39 PM, Hendra Soetjahja via docs
<docs at python.org> wrote:
> Hi Python Development Team,
>
> There are 3 bugs in Tutorial for Python 3.6.2. Section 4.4 (p. 19).
> These are tested for both in Python 2.7, 3.5, and 3.6 interpreters, as
> module and in interactive mode.
> I also tested it on Ubuntu 16.04 LTS, Windows 7, and Windows 10.

Fortunately, the bug is in your transcription of the example, not in
the docs (nor Python itself).  Look at the line immediately following
the example:

> (Yes, this is the correct code. Look closely: the else clause belongs to the for loop, not the if statement.)

Note also that this section is titled "..., and else Clauses on Loops".

This was also recently reported on the bug tracker; if you have any
suggestions for improving the clarity of that section, please add a
comment to http://bugs.python.org/issue31037

Regards,
-- 
Zach


   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20170727/3c283045/attachment.html>


More information about the docs mailing list