[issue1617161] Instance methods compare equal when their self's are equal

Serhiy Storchaka report at bugs.python.org
Fri Jun 22 03:06:07 EDT 2018


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

PR 7848 is based on method_compare.diff and 1617161_test_update.diff, but also makes types.MethodWrapperType unorderable, adds more tests and fixes some outdated tests.

This change can be considered as a bugfix, but since it can break the user code (unlikely), it may be safer to merge it only in 3.8 and expose as a new feature.

But changes to the hash of types.BuiltinMethodType may be backported. Currently the hash is not consistent with the equality.

----------
versions: +Python 3.8 -Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue1617161>
_______________________________________


More information about the Python-bugs-list mailing list