On 20Jul2018 1119, Brendan Barnwell wrote:
In this situation I lean toward "explicit is better than implicit" --- if you want to compare against None, you should do so explicitly --- and "special cases aren't special enough to break the rules" --- that is, None is not special enough to warrant the creation of multiple new operators solely to compare things against this specific value.

"The rules" declare that None is special - it's the one and only value that represents "no value". So is giving it special meaning here breaking the rules or following them? (See also the ~50% of the PEP dedicated to this subject, and also consider proposing a non-special result for "??? if has_no_value(value) else value" in the 'True' case.)

Cheers,
Steve
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to