This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gvanrossum
Recipients gvanrossum, kj, lukasz.langa, uriyyo
Date 2021-09-21.19:10:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1632251423.69.0.412989059163.issue44807@roundup.psfhosted.org>
In-reply-to
Content
I wonder if part of the problem here isn't that protocols are primarily focused on instances, where the __init__ method is explicitly *not* considered part of the type.

IIRC supporting protocols for classes was an afterthought.

That said you have made a good case for seeing it as part of the protocol  when the Type[] operator is applied to the protocol.

So yes, I think we should be careful ruling that out too soon. Do we have any evidence that users are confused and define __init__ methods on protocols that are being ignored by their type checkers? The OP didn't say.

When in doubt, let the status quo win.
History
Date User Action Args
2021-09-21 19:10:23gvanrossumsetrecipients: + gvanrossum, lukasz.langa, uriyyo, kj
2021-09-21 19:10:23gvanrossumsetmessageid: <1632251423.69.0.412989059163.issue44807@roundup.psfhosted.org>
2021-09-21 19:10:23gvanrossumlinkissue44807 messages
2021-09-21 19:10:23gvanrossumcreate