<br><br><div class="gmail_quote">On Thu, Oct 1, 2009 at 11:11 PM, Yuvgoog Greenle <span dir="ltr"><<a href="mailto:ubershmekel@gmail.com">ubershmekel@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr">Let me rephrase - for..else is a _misleading_ construct. It suggests one thing yet does another.<div><br></div><div>This response is way too long, so here's a TOC:</div><div>1. The Question Challenge - A way to examine if "for..else" is just unintuitive or misleading.</div>

<div>2. What can be done about for...else.</div><div>3. Lets talk about "try/else" because a few people mentioned it as though it's somehow related to the discussion.</div><div><br></div><div>----------------</div>

<div>1. The Question Challenge - A way to examine if "for..else" is just unintuitive or misleading.</div><div><br></div><div>Antti's experiment got me asking, you can try this as well. Ask a person who knows python the following questions:</div>

<div>Question #1: Do you know what happens when an "else" appears after a "for" loop?</div><div>    if they answer yes then say nevermind.</div><div>    otherwise: continue to question #2.</div><div>Question #2: When would the code in the "else" block execute? If you don't know, it's ok to guess.</div>

<div>    If they answer "when a break didn't occur", I'm willing to give you, the asker, up to 100 lines of patch code in whatever python project you want..</div><div>    If they answer "maybe when the for loop didn't run or was an empty list" then you don't owe me anything.</div>

<div><br></div></div></blockquote><div><br>Head on over to graphine.org- I'm getting requests for database-backed graphs and don't know enough to do it portably. I asked 4 and got 2 correct answers, but I'm happy with the promised 100 lines. If you know as little about databases as I do, take a look at the graphml code- it's out of date and probably doesn't work.<br>
<br></div></div>Geremy Condra<br>