Old #Python: check types at runtime — if isinstance(x, int) — or just hope. New Python: x: int, checked by mypy before you run. Type hints didn't exist in the Python most people learned. Now that they do, a tool can flag mismatches before errors occur in production.
3 likes 0 replies
?