4 ms·
Equal to which class? If I have MyClass1 and MyClass2 with different body, after revolution, MyClass1 will be like MyClass2 or MyClass2 like MyClass1?
by sbassi 5y ago
Equal to which class?
If I have MyClass1 and MyClass2 with different body, after revolution, MyClass1 will be like MyClass2 or MyClass2 like MyClass1?
- kjgkjhfkjf 5y agoIt patches each class's __eq__ and __hash__ so they return True and hash(1) respectively.
- pdonis 5y agoYes, which means they also compare equal to any object whatever, and they hash equal to the integer 1 and the boolean True.
- swebs 5y agoReminds me of the silliness you'd see in "C Plus Equality" https://github.com/TheFeministSoftwareFoundation/C-plus-Equality https://github.com/TheFeministSoftwareFoundation/C-plus-Equa...