[issue43512] Bug in isinstance(instance, cls) with cls being a protocol? (PEP 544)

Guido van Rossum report at bugs.python.org
Tue Mar 16 13:06:36 EDT 2021


Guido van Rossum <guido at python.org> added the comment:

Yeah, the runtime isinstance() checking is not required to give the right answer. Also, I believe one of the rules is "if you inherit from a protocol you are deemed to implement it". For methods, abstract methods can (but needn't) be used to indicate mandatory features. For attributes, there is no guarantee.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

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


More information about the Python-bugs-list mailing list