while True or while 1

alex23 wuwei23 at gmail.com
Sun Jan 22 22:55:44 EST 2012


On Jan 23, 2:05 am, Dan Sommers <d... at tombstonezero.net> wrote:
> As per a now-ancient suggestion on this mailing list (I believe it was by
> Tim Peters), I've also been known to use a non-empty, literal Python
> string as a self-documenting, forever-True value in the typical loop-and-a-
> half cnstruct:
>
>     while "the temperature is too big":

I don't think I've ever encountered this before, but I like it :)
Cheers!



More information about the Python-list mailing list