Message402348
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. |
|
Date |
User |
Action |
Args |
2021-09-21 19:10:23 | gvanrossum | set | recipients:
+ gvanrossum, lukasz.langa, uriyyo, kj |
2021-09-21 19:10:23 | gvanrossum | set | messageid: <1632251423.69.0.412989059163.issue44807@roundup.psfhosted.org> |
2021-09-21 19:10:23 | gvanrossum | link | issue44807 messages |
2021-09-21 19:10:23 | gvanrossum | create | |
|