You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A possible solution is to append a call to existing __init__ while overwriting (after the check for _is_protocol=True, where we unconditionally raise because protocols can't be instantiated). This way explicit non-protocol subclasses can use a protocol __init__ as a "default constructor". Default implementations are already supported for other protocol members, so it is natural to expect that __init__ is not different. See also python/mypy#3823