Created
March 12, 2026 16:31
-
-
Save mypy-play/c2b64392c1877fce9b93f56d8349e1ae to your computer and use it in GitHub Desktop.
Shared via mypy Playground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import typing | |
| class P(typing.Protocol): | |
| def foo(self, a: int) -> None: ... | |
| class C: | |
| def foo(self, *args: int) -> None: pass | |
| def f(o: P) -> None: | |
| o.foo(a=1) | |
| f(C()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment