3 ms·
There's some info in the PEP for protocols about their advantages versus other approaches: https://peps.python.org/pep-0544/#rationale-and-goals https://peps.p
by saila 4y ago
There's some info in the PEP for protocols about their advantages versus other approaches:
https://peps.python.org/pep-0544/#rationale-and-goals https://peps.python.org/pep-0544/#rationale-and-goals
https://peps.python.org/pep-0544/#existing-approaches-to-structural-subtyping https://peps.python.org/pep-0544/#existing-approaches-to-str...
As to mypy being optional, it's easy enough to make it required via git hooks and/or CI. If your process doesn't make this easy for mypy or any other tool (e.g. formatting), I'd wager there are more fundamental issues.