Loop until condition is true
fredrik at pythonware.com
Wed Jun 22 09:54:44 CEST 2005
Remi Villatel wrote:
> >>while True:
> >> some(code)
> >> if final_condition is True:
> >> break
> >> #
> > checking if a logical expression is true by comparing it to True is bad
> > style, and comparing values using "is" is also bad style.
> Erm... You totally missed the point. I wrote it this way because, first,
> it's perfectly valid Python code and, second and most important, it's also a
> valid english sentence.
I suggest looking up "is" in the Python manual instead of looking it
up in a dictionary. (hint: it doesn't do what you think it does, and
code using your "perfectly valid" pattern doesn't always work.)
> [CENSORED] I keep for myself how stupid I found your post.
so let's see if everyone who understands how embarrassingly stupid
your post is will keep that to themselves...
More information about the Python-list