[issue13206] while loop vs for loop test
New submission from R Blackmore squan...@yahoo.com: Using Python 3.2.2 on Windows 7 See attached file Was having problem with a program I was doing... couldn't get around issue unless I changed from while loop to for loop... WTF??? So restarted computer and then Python Shell and IDLE I wrote a very simple loop file... The 1st loop is a while loop that hangs and only prints divisor 1 and divisor 2 (Should also print divisor 5) For loop works as expected printing divisor 1 divisor 2 divisor 3 Unless I'm missing something both loops should return (i.e. print) same! Cheers -- components: IO files: LOOP_Test1.py messages: 145775 nosy: JavaJunkie priority: normal severity: normal status: open title: while loop vs for loop test versions: Python 3.2 Added file: http://bugs.python.org/file23436/LOOP_Test1.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13206 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13206] while loop vs for loop test
R Blackmore squan...@yahoo.com added the comment: for loop works correctly prints divisor 1 divisor 2 divisor 5 (original post incorrectly listed divisor 3,) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13206 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13206] while loop vs for loop test
R Blackmore squan...@yahoo.com added the comment: I knew it was late... Should have slept on it Thanks --- On Tue, 10/18/11, Mark Dickinson rep...@bugs.python.org wrote: From: Mark Dickinson rep...@bugs.python.org Subject: [issue13206] while loop vs for loop test To: squan...@yahoo.com Date: Tuesday, October 18, 2011, 12:13 AM Mark Dickinson dicki...@gmail.com added the comment: Your 'i = i + 1' is at the wrong indentation level. -- nosy: +mark.dickinson resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13206 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13206 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com