
On 8 August 2012 17:59, Oleg Broytman <phd@phdru.name> wrote:
On Thu, Aug 09, 2012 at 02:18:53AM +1000, Ben Finney < ben+python@benfinney.id.au> wrote:
What is a compelling use case for checking precisely for True or False?
To distinguish False and None for a tri-state variable that can have 3 values - "yes", "no" and "unspecified" - True, False and None in Python-speak.
Or when testing, I often want to check that a method *really* returns True or False rather than some object that happens to evaluate to True or False. Michael
Oleg. -- Oleg Broytman http://phdru.name/ phd@phdru.name Programmers don't die, they just GOSUB without RETURN. _______________________________________________ Python-ideas mailing list Python-ideas@python.org http://mail.python.org/mailman/listinfo/python-ideas
-- http://www.voidspace.org.uk/ May you do good and not evil May you find forgiveness for yourself and forgive others May you share freely, never taking more than you give. -- the sqlite blessing http://www.sqlite.org/different.html