ramalho <luci...@ramalho.org> added the comment:

After experimenting with theses protocols, I believe the user community is 
better served by leaving undocumented the fact that they are runtime checkable, 
because their runtime results are inconsistent with how Mypy handles them, 
producing both false positives and false negatives.

I've documented the problems 
(https://github.com/fluentpython/abc-protocol-labs/blob/master/protocol-issues.rst)
 and started two threads about them in the typing-sig mailing list:

[1] 
https://mail.python.org/archives/list/typing-...@python.org/message/CSM3ZCWNRBO4RGGTSM664DD37JYOUVCO/
 
[2] 
https://mail.python.org/archives/list/typing-...@python.org/message/FSV6WSFGWD4QZO6ECY3JADF7M2PW5FKK/

Thread [1] got a useful partial response from Guido. Open questions remain. 
Thread [2] got no response at all.

I will gladly reengage in those threads or in this issue if there is interest. 
As it stands, I believe the use of the @runtime_checkable feature on several of 
these protocols is unreliable and should not be promoted.

----------

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

Reply via email to