while True or while 1

Max Countryman maxc at me.com
Sun Dec 12 09:14:16 EST 2010


I'm sure this has been brought up many times, but a quick Googling didn't yield the decisive results I was hoping for, so I apologize if this has already been addressed in great detail somewhere else.

I am wondering what the rationale is behind preferring while True over while 1? For me, it seems that using True provides more clarity, but is that the only benefit? Is while 1 more prone to errors?


Thanks!



More information about the Python-list mailing list