New submission from Zac Hatfield-Dodds <zac.hatfield.do...@gmail.com>:

>>> 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.

The versions of these classes in the typing module have the same problem.

----------
components: Library (Lib)
messages: 358386
nosy: Zac Hatfield-Dodds
priority: normal
severity: normal
status: open
title: collections.abc.Reversible should not be a subclass of Hashable
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39046>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to