[issue38878] os.PathLike subclasshook causes subclass checks true on abstract implementation
Ammar Askar
report at bugs.python.org
Fri Nov 22 20:39:00 EST 2019
Ammar Askar <ammar at ammaraskar.com> added the comment:
Just for reference/existing behavior:
>>> class A(collections.abc.Iterable): pass
...
>>> class B:
... def __iter__(): pass
...
>>> issubclass(B, A)
False
>>> issubclass(B, collections.abc.Iterable)
True
>>> issubclass(A, collections.abc.Iterable)
True
----------
nosy: +ammar2
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38878>
_______________________________________
More information about the Python-bugs-list
mailing list