Re: while-loops enter the last time after condition is filled?

2008-04-07 Thread Sumit
On Apr 6, 4:53 am, [EMAIL PROTECTED] wrote:
 it seems to me from my results that when i use a while-loop it will
 execute once after the condition is met.
Perhaps your condition is wrong. Please provide the code where this
occured.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: while-loops enter the last time after condition is filled?

2008-04-07 Thread [EMAIL PROTECTED]
On 6 avr, 01:53, [EMAIL PROTECTED] wrote:
 it seems to me from my results that when i use a while-loop it will
 execute once after the condition is met.

 ie the conditions is met the code executes one time more and then
 quits.

The problem is obviously in your code, but since you failed to post
the minimal code exhibiting the problem, we can't help.
-- 
http://mail.python.org/mailman/listinfo/python-list


while-loops enter the last time after condition is filled?

2008-04-05 Thread skanemupp
it seems to me from my results that when i use a while-loop it will
execute once after the condition is met.

ie the conditions is met the code executes one time more and then
quits.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: while-loops enter the last time after condition is filled?

2008-04-05 Thread Tim Chase
 it seems to me from my results that when i use a while-loop it
 will execute once after the condition is met.

Nope.

 ie the conditions is met the code executes one time more and
 then quits.

Must be that your conditional is wrong, or your conditions are 
not updated the way you think they are.

-tkc


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: while-loops enter the last time after condition is filled?

2008-04-05 Thread John Machin
On Apr 6, 9:53 am, [EMAIL PROTECTED] wrote:
 it seems to me from my results that when i use a while-loop it will
 execute once after the condition is met.

 ie the conditions is met the code executes one time more and then
 quits.

The syntax is this:

while condition:
do_something()

Do you mean that it executes do_something() only once, but you expect
it to execute more that once?

Or should we interpret your seemingly inconsistent statement by
changing condition(s) is met to condition(s) is NOT met -- in
other words, it is executing one EXTRA time after you expect it to
have stopped?

Perhaps you should supply a short example of runnable code (including
print statements to show what is happening), the actual output that
you got when you ran that code, and what was the output that you
expected.
-- 
http://mail.python.org/mailman/listinfo/python-list