I am working on a collection class for which I want to create an __eq__ method. It turned out to be more subtle than I thought it would be, and I noticed a few subtleties of how built-in collection classes work.
What really helps me the most is a good example. Are there any pure Python implementations of the __eq__ method either in the standard library or in any third-party libraries?
python equality collections api
Jason baker
source share