Re: Newbie question: Explain this behavior - a followup

2005-07-20 Thread David Smith
max wrote: > David Smith <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > > >>range statements, the example doesn't work. >> >>Given that the beginning and ending values for the inner range >>statement are the same, the inner range statement will never be > > > Is your question about t

Re: Newbie question: Explain this behavior - a followup

2005-07-15 Thread max
David Smith <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > range statements, the example doesn't work. > > Given that the beginning and ending values for the inner range > statement are the same, the inner range statement will never be Is your question about the semantics of for else bl

Re: Newbie question: Explain this behavior - a followup

2005-07-15 Thread David Smith
First, thanks to those who offered answers. They didn't really answer my question, only because I had not worked through the example sufficiently well. Doing this, I believe I understand what is happening, and, if my understanding is correct, have discovered that for other beginning and ending va

Re: Newbie question: Explain this behavior

2005-07-14 Thread Ross Wilson
On Thu, 14 Jul 2005 15:46:40 -0700, David Smith wrote: > Why does code snippet one work correctly, but not two. The only > difference is the placement of the "else". I know that indentation > affects execution, but how does it change behavior in the following > examples? Thank you. > > 1. for

Re: Newbie question: Explain this behavior

2005-07-14 Thread George Sakkis
"David Smith" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Why does code snippet one work correctly, but not two. The only > difference is the placement of the "else". I know that indentation > affects execution, but how does it change behavior in the following > examples? Thank

Newbie question: Explain this behavior

2005-07-14 Thread David Smith
Why does code snippet one work correctly, but not two. The only difference is the placement of the "else". I know that indentation affects execution, but how does it change behavior in the following examples? Thank you. 1. for n in range(2, 10): for x in range(2, n): if n % x =