new to While statements

Dave Angel davea at davea.name
Wed Aug 7 21:31:09 EDT 2013


Vito De Tullio wrote:

> Dan Sommers wrote:
>
>>>>         while "asking for reponse":
>>> 
>>>>         while "adventuring":
>>> 
>>> that's a funny way to say `while True:`...
>> 
>> Funny, perhaps, the first time you see it, but way more informative than
>> the other way to the next one who comes along and reads it.
>
> While I understand that it's syntactically and semantically correct, my nose 
> still doesn't like it.
>

Neither does mine.  There's no need for a trick here.   "while True"
reads better, and a comment (on the same line, preferably) can explain
what the loop is for.


-- 
DaveA




More information about the Python-list mailing list