Ken Jin <kenjin4...@gmail.com> added the comment:

I suspect this may be intentional. See related issues 
https://bugs.python.org/issue35190 and https://bugs.python.org/issue23864.

Copying verbatim from what Ivan said in the first issue:

"
The separation may look arbitrary, but the idea is quite simple. Only those 
classes with few methods support structural checks. Those classes have few 
independent abstract methods (or even just one method), while in classes with 
large APIs like `Sequence`, the methods are not logically independent, so you 
can't say a class is 100% a `Sequence` even if types/signatures of all methods 
are correct, because e.g. `__contains__()` and `index()` should behave in 
agreement with `__getitem__()`.
"

----------

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

Reply via email to