[issue39046] collections.abc.Reversible should not be a subclass of Hashable

2020-10-22 Thread Zac Hatfield-Dodds
Zac Hatfield-Dodds added the comment: I'm closing this as not-a-bug. The way protocols just check methods does make sense (thanks for your comment Guido!), and a later refactoring of the code that prompted this issue (to deal only in concrete classes) dissolved the problem. --

[issue39046] collections.abc.Reversible should not be a subclass of Hashable

2019-12-20 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39046] collections.abc.Reversible should not be a subclass of Hashable

2019-12-14 Thread Guido van Rossum
Guido van Rossum added the comment: I don't know that this is easily solved. By design, issubclass(X, Hashable) checks whether X defines a __hash__ method (or at least has a class attribute __hash__ that isn't None). And because everything ultimately derives from object, which *does* have a

[issue39046] collections.abc.Reversible should not be a subclass of Hashable

2019-12-14 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39046] collections.abc.Reversible should not be a subclass of Hashable

2019-12-14 Thread Lovi
Change by Lovi <1668151...@qq.com>: -- nosy: +lovi versions: -Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list

[issue39046] collections.abc.Reversible should not be a subclass of Hashable

2019-12-14 Thread SilentGhost
Change by SilentGhost : -- nosy: +rhettinger, stutzbach versions: -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue39046] collections.abc.Reversible should not be a subclass of Hashable

2019-12-14 Thread Zac Hatfield-Dodds
New submission from Zac Hatfield-Dodds : >>> from collections.abc import Hashable, Reversible >>> assert issubclass(Reversible, Hashable) However, this is trivially wrong - lists are Reversible but not Hashable, and there is no reason to thing that reversible objects should all be hashable.