On Tue, Aug 31, 2021 at 05:17:35PM -0700, Matthias Bussonnier wrote: > Basically anything that implements __eq__ and assumes it will be > compared only against things that are of the same type will not be > happy to be compared with None using ==.
I agree with Oscar that the various objects you list that fail when comparing against other objects are buggy. All operators, including comparisons, are supposed to return NotImplemented if called with an argument they don't know how to operate on. And as for FontProperties comparing hashes only, ouch! Hopefully its a 64-bit hash and not a 32- or 16-bit. -- Steve _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/A3PMYJZDLW3FYIBQ76OMYRZECMMEGR7L/ Code of Conduct: http://python.org/psf/codeofconduct/