Steven D'Aprano wrote:
Equality tests really ought not to fail. If they do fail, it should be considered a bug in the __eq__ method, not an intentional result.
> To allow == tests to fail is just a way of sneaking in a three-value > logic into the language, only using an extremely inconvenient API: In the case being considered here, I would argue that attempting to compare dict.values() results is a symptom of a bug in the code performing that comparison, or at least a smell suggesting that the programmer hasn't thought something through properly. The remedy is to re-write that code to be explicit about what is really wanted. There is no three-valued logic involved here. -- Greg _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/FP52QVMJIB6O4DJMZV2NLWC4WIKELRRY/