2 ms·
> "new" in 3.8, oh nice You can have them in earlier versions with the typing-extensions library. [0] > For static type checking Protocols can be used for ru
by BerislavLopac 5y ago
> "new" in 3.8, oh nice
You can have them in earlier versions with the typing-extensions library. [0]
> For static type checking
Protocols can be used for runtime checks as well. [1]
[0] https://pypi.org/project/typing-extensions/ https://pypi.org/project/typing-extensions/
[1] https://docs.python.org/3.9/library/typing.html#typing.runtime_checkable https://docs.python.org/3.9/library/typing.html#typing.runti...