not really, the int will eventually overflow and cycle around ;)<br><br><div class="gmail_quote">On Tue, Mar 30, 2010 at 8:11 AM, Xavier Ho <span dir="ltr"><<a href="mailto:contact@xavierho.com">contact@xavierho.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Did no one notice that<div class="im"><br><br><span style="font-family:courier new,monospace">for(i = 99; i > 0; ++i)</span><br>
<br></div>Gives you an infinite loop (sort of) because i starts a 99, and increases every loop?<br><br>Cheers,<br>

<br clear="all">Ching-Yun Xavier Ho, Technical Artist<br><br>Contact Information<br>Mobile: (+61) 04 3335 4748<br>Skype ID: SpaXe85<br>Email: <a href="mailto:contact@xavierho.com" target="_blank">contact@xavierho.com</a><br>
Website: <a href="http://xavierho.com/" target="_blank">http://xavierho.com/</a><div><div></div><div class="h5"><br>


<br><br><div class="gmail_quote">On Tue, Mar 30, 2010 at 9:40 PM, Alf P. Steinbach <span dir="ltr"><<a href="mailto:alfps@start.no" target="_blank">alfps@start.no</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">


* Jean-Michel Pichavant:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
John Nagle wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div>
Jonathan Hayward wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
I've posted "Usability, the Soul of Python: An Introduction to the<br>
Python Programming Language Through the Eyes of Usability", at:<br>
<br>
   <a href="http://JonathansCorner.com/python/" target="_blank">http://JonathansCorner.com/python/</a><br>
</blockquote>
<br>
   No, it's just a rather verbose introduction to Python, in dark brown<br>
type on a light brown background.  One could write a good paper on this<br>
topic, but this isn't it.<br>
<br>
<br></div>
                John Nagle<br>
</blockquote>
Why is it bad ?<br>
</blockquote>
<br>
Consider<br>
<br>
<br>
<quote><br>
>From a usability standpoint, the braces go with the lines to print out the stanza rather than the for statement or the code after, so the following is best:<br>
<br>
for(i = 99; i > 0; ++i)<br>
    {<br>
    printf("%d slabs of spam in my mail!\n", i);<br>
    printf("%d slabs of spam,\n", i);<br>
    printf("Send one to abuse and Just Hit Delete,\n");<br>
    printf("%d slabs of spam in my mail!\n\n", i + 1);<br>
    }<br>
</quote><br>
<br>
<br>
This is just unsubstantiated opinion, but worse, it makes a tacit assumption that there is "best" way to do indentation. However, most programmers fall into that trap, and I've done it myself. In fact, when I worked as a consultant (then in Andersen Consulting, now Accenture) I used the style above. Petter Hesselberg, author of "Industrial Strength Windows Programming" (heh, I'm mentioned) asked my why on Earth I did that, like, nobody does that? It was a habit I'd picked up in Pascal, from very naïve considerations of parse nesting levels, a kind of misguided idealism instead of more practical pragmatism, but since I realized that that was an incredibly weak argument I instead answered by pointing towards Charles Petzold's code in his "Programming Windows" books. And amazingly I was allowed to continue using this awkward and impractical style.<br>



<br>
I may or may not have been responsible for the similarly impractical compromise convention of using three spaces per indentation level. At least, in one big meeting the question about number of spaces was raised by the speaker, and I replied from the benches, just in jest, "three!". And that was it (perhaps).<br>



<br>
<br>
Cheers,<br>
<br>
- Alf  (admitting to earlier mistakes)<div><div></div><div><br>
-- <br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br>
</div></div><br>--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
<br></blockquote></div><br>