4 ms·
The idea is that not all code in your code will be typed. So while at the typed callee everything is all hunky-dory, any random subclass might not be typed. The
by tekknolagi 3y ago
The idea is that not all code in your code will be typed. So while at the typed callee everything is all hunky-dory, any random subclass might not be typed. The subclass could even be a C extension.
EDIT: Also, the point is that even if it's well-typed, it can still go and execute arbitrary code. So you can't just specialize the callee.
EDIT: Pushed and thanked you in the commit.
- BerislavLopac 3y ago> The idea is that not all code in your code will be typed. All Python code is always typed; it just might not be annotated. Even then, static analysis tools like mypy are pretty good at inferring types based on the code.