<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1501116296079_21032">Hi Zachary,</div><div id="yui_3_16_0_ym19_1_1501116296079_21033"><br></div><div id="yui_3_16_0_ym19_1_1501116296079_21034">Right you are.<br></div><div id="yui_3_16_0_ym19_1_1501116296079_21062">I need a reading glasses or get more sleep to see the indentation correctly  :)</div><div id="yui_3_16_0_ym19_1_1501116296079_21336">I suppose it's C/C++ programmer cognitive perception/dissonance that else goes with the if, not with for.</div><div id="yui_3_16_0_ym19_1_1501116296079_22144">We just glance it and started running the algo with if-else pairing in our head.</div><div id="yui_3_16_0_ym19_1_1501116296079_22212">It's like sleight of hand magic tricking our cognitive 'expectation' based on C/C++ experience.<br></div><div id="yui_3_16_0_ym19_1_1501116296079_21374"><br></div><div id="yui_3_16_0_ym19_1_1501116296079_21120">You probably know it immediately when I copied the code with incorrect indentation in my email.<br></div><div id="yui_3_16_0_ym19_1_1501116296079_21035"><span><br></span></div><div id="yui_3_16_0_ym19_1_1501116296079_21063"><span>Thanks,  Hendra</span></div><div id="yui_3_16_0_ym19_1_1501116296079_21050"> </div><div class="signature" id="yui_3_16_0_ym19_1_1501116296079_21065"><div id="yui_3_16_0_ym19_1_1501116296079_21064"><font face="verdana, helvetica, sans-serif"></font> </div><div style="color:rgb(0, 0, 0);font-family:verdana, helvetica, sans-serif;font-size:10.06px;font-style:normal;background-color:transparent;" id="yui_3_16_0_ym19_1_1501116296079_21067"><font id="yui_3_16_0_ym19_1_1501116296079_21066" face="verdana, helvetica, sans-serif">----------------------------------------------------------------------------------<br>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.<br>----------------------------------------------------------------------------------<var id="yui-ie-cursor"></var></font></div></div><div class="qtdSeparateBR" id="yui_3_16_0_ym19_1_1501116296079_21109"><br><br></div><div class="yahoo_quoted" id="yui_3_16_0_ym19_1_1501116296079_21113" style="display: block;">  <div style="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1501116296079_21112"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1501116296079_21111"> <div dir="ltr" id="yui_3_16_0_ym19_1_1501116296079_21110"> <font id="yui_3_16_0_ym19_1_1501116296079_21281" size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Zachary Ware <zachary.ware+pydocs@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> "docs@python.org" <docs@python.org> <br><b><span style="font-weight: bold;">Cc:</span></b> Hendra Soetjahja <hendras@yahoo.com><br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, July 26, 2017 10:53 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [docs] Bugs in Tutorial for Python 3.6.2. Section 4.4 (p. 19)<br> </font> </div> <div class="y_msg_container" id="yui_3_16_0_ym19_1_1501116296079_21282"><br><div dir="ltr" id="yui_3_16_0_ym19_1_1501116296079_22046">Hi Hendra,<br clear="none"><div class="yqt2501869973" id="yqtfd76693"><br clear="none">On Wed, Jul 26, 2017 at 6:39 PM, Hendra Soetjahja via docs<br clear="none"><<a shape="rect" ymailto="mailto:docs@python.org" href="mailto:docs@python.org">docs@python.org</a>> wrote:<br clear="none">> Hi Python Development Team,<br clear="none">><br clear="none">> There are 3 bugs in Tutorial for Python 3.6.2. Section 4.4 (p. 19).<br clear="none">> These are tested for both in Python 2.7, 3.5, and 3.6 interpreters, as<br clear="none">> module and in interactive mode.<br clear="none">> I also tested it on Ubuntu 16.04 LTS, Windows 7, and Windows 10.</div><br clear="none"><br clear="none">Fortunately, the bug is in your transcription of the example, not in<br clear="none">the docs (nor Python itself).  Look at the line immediately following<br clear="none">the example:<br clear="none"><br clear="none">> (Yes, this is the correct code. Look closely: the else clause belongs to the for loop, not the if statement.)<br clear="none"><br clear="none">Note also that this section is titled "..., and else Clauses on Loops".<br clear="none"><br clear="none">This was also recently reported on the bug tracker; if you have any<br clear="none">suggestions for improving the clarity of that section, please add a<br clear="none">comment to <a shape="rect" href="http://bugs.python.org/issue31037" target="_blank">http://bugs.python.org/issue31037</a><br clear="none"><br clear="none">Regards,<br clear="none">-- <br clear="none">Zach<div class="yqt2501869973" id="yqtfd77883"><br clear="none"></div></div><br><br></div> </div> </div>  </div></div></body></html>