This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jdemeyer
Recipients jdemeyer
Date 2018-06-21.10:07:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1529575652.49.0.56676864532.issue33925@psf.upfronthosting.co.za>
In-reply-to
Content
Methods of Python functions compare equal if the functions are equal and if __self__ is equal:

>>> class X:
...     def __eq__(self, other): return True
...     def meth(self): pass
>>> X().meth == X().meth
True

This is because X() == X() even though X() is not X().

For extension types, we get instead:

>>> [].append == [].append
False

This is because comparison is done with "is" instead of "==". This is a needless difference.
History
Date User Action Args
2018-06-21 10:07:32jdemeyersetrecipients: + jdemeyer
2018-06-21 10:07:32jdemeyersetmessageid: <1529575652.49.0.56676864532.issue33925@psf.upfronthosting.co.za>
2018-06-21 10:07:32jdemeyerlinkissue33925 messages
2018-06-21 10:07:32jdemeyercreate