#python #programming #typing #doc
-
Duck Typing: more flexible, only the objects has type. However, errors can happen during the executions. Which operation are supported is the important here
- Static Protocol is a type of Duck Typing
-
Nominal: Strict and rigid. Parameters and variables are typed as well. Code that is correct can be stated as wrong for
mypy
. What it is matters is the source code.
References
- Ramalho, 2022, p260-265