[issue33925] builtin_function_or_method compares __self__ by identity instead of equality

2018-06-21 Thread R. David Murray
R. David Murray added the comment: This is still a duplicate issue, though, you are just arguing for a different resolution of the other one :) -- nosy: +r.david.murray ___ Python tracker

[issue33925] builtin_function_or_method compares __self__ by identity instead of equality

2018-06-21 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > This is a duplicate of issue1617161. Well, it's really the opposite. That issue seems to be arguing that __self__ should be compared using "is" while I think it should be compared using "==". -- ___ Python

[issue33925] builtin_function_or_method compares __self__ by identity instead of equality

2018-06-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue1617161. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Instance methods compare equal when their self's are equal ___

[issue33925] builtin_function_or_method compares __self__ by identity instead of equality

2018-06-21 Thread Jeroen Demeyer
New submission from Jeroen Demeyer : 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()