Re: "...while thing == None would work perfectly in almost all cases in practice, it's unidiomatic and suggests the writer isn't quite comfortable with the workings of the language"
I admit, I've been a C++ programmer for many years and a Python programmer for only about 5 years. But, I did learn something here. I've read books on Python and somehow still did not know that None is guaranteed to be a singleton in all implementations, and that not only does "thing is None" therefore work (guaranteed), but that that is the Pythonic thing to do. ... Maybe I missed it, but I'll remember it now. --- Joseph S. -- https://mail.python.org/mailman/listinfo/python-list