Andrea Crotti wrote:
I see sometimes in other people code "while 1" instead of "while True". I think using True is more pythonic, but I wanted to check if there is any difference in practice.
No (with the exception of `True` and `False` being rebinable in Python 2). The idiomatic `while 1` notation comes from back in the pre-Boolean days. In any reasonably modern implementation, `while True` is more self-documenting. I would imagine the primary reason people still do it, any after-the-fact rationalizations aside, is simply habit.
-- Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Jabber erikmaxfrancis Ambition can creep as well as soar. -- Edmund Burke -- http://mail.python.org/mailman/listinfo/python-list