Author steven.daprano
Recipients crusaderky, steven.daprano
Date 2019-09-11.11:00:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568199614.31.0.52690475.issue38105@roundup.psfhosted.org>
In-reply-to
Content
Here's a possibly simpler version which nevertheless still shows multiple calls to __eq__ (in this case, only 6, not 13):

class C(object):
    def __eq__(self, other):
        print('eq')
        return super().__eq__(other)
    def __hash__(self):
        return -2

d = {-2, C()}



which outputs:
eq
eq
eq
eq
eq
eq
History
Date User Action Args
2019-09-11 11:00:14steven.dapranosetrecipients: + steven.daprano, crusaderky
2019-09-11 11:00:14steven.dapranosetmessageid: <1568199614.31.0.52690475.issue38105@roundup.psfhosted.org>
2019-09-11 11:00:14steven.dapranolinkissue38105 messages
2019-09-11 11:00:14steven.dapranocreate