[Python-Dev] PEP 544: Protocols

Matthias Kramm kramm at google.com
Tue Mar 21 19:50:39 EDT 2017


On Tue, Mar 21, 2017 at 11:05 AM, Ivan Levkivskyi <levkivskyi at gmail.com>
wrote:

> There are two places where PEP draft says:
>
> "Note that there is no conceptual difference between explicit and implicit
> subtypes"
>
> and
>
> "The general philosophy is that protocols are mostly like regular ABCs,
> but a static type checker will handle them specially."
>
> Do you want to propose alternative wording for these, or would you rather
> like an additional statement?
>

Let's do an additional statement. Something like

"Static analysis tools are expected to automatically detect that a class
implements a given protocol. So while it's possible to subclass a protocol
explicitly, it's not necessary to do so for the sake of type-checking."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20170321/dae83898/attachment-0001.html>


More information about the Python-Dev mailing list