
Sept. 1, 2021
8:58 p.m.
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