Understanding Python type annotations and callable signatures
This is a medium-difficulty Python question that tests your grasp of type annotations and how static type checkers like mypy validate function calls. It asks you to reason about what signature or annotation would cause a type checker to flag an error, rather than asking you to write code that runs.
The question probes whether you understand the distinction between declaring callable types, parameter constraints, and how type checkers enforce those constraints at analysis time. You'll need to think about function signatures, typing constructs, and the rules type checkers apply when matching arguments to parameters.
- Callable type syntax and parameter specifications
- Type checker validation rules
- Mismatch detection between declared and actual signatures