On 27/07/18 17:23, Schachner, Joseph wrote:
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.
Your apology is accepted. Thank you.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list