rbt wrote:
> [EMAIL PROTECTED] wrote:
>> finished = False
>> while not finished:
> 
> Why don't you just write 'while True'??? 'while not false' is like 
> saying 'I am not unemployed by Microsoft' instead of saying 'I am 
> employed by Microsoft'. It's confusing, complex and unnecessary. Lawyers 
> call it circumlocution (talking around the truth).
> 
>>   before = time.time()
>>   do(x) # sets finished if all was computed
>>   after = time.time()
>>   delta = after-before
>>   time.sleep(delta*10/3.)

The answer to your question "why not write 'while True'?" is to be found 
in the helpful comment he put on the line with "do(x)"....  Note that 
"finished" is a flag, so "sets finished" sort of explains the whole thing.

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

Reply via email to