Wannabe 4
What this preview is
Wannabe 4 is a easy quant interview question on language knowledge in Python.
- Difficulty
- Easy
- Topic
- Language Knowledge
- Discipline
- Quant development
- Language
- Python
- Companies
- 0
Understanding type inference in Python type checkers
This is a straightforward easy question about how static type checkers like mypy or pyright infer and annotate variable types in Python. It tests whether you can read a code snippet and predict what a type-checking tool would report, rather than what the runtime value happens to be.
To answer questions like this, you need to understand how type checkers propagate type information through assignments, function calls, and expressions. The distinction between what Python's runtime permits and what a strict type checker will flag is crucial for writing code that passes static analysis in professional codebases.
- Type inference rules and assignment chains
- Difference between runtime behaviour and static analysis
- How type checkers handle ambiguous or implicit types
Related practice
Unlock full access to getcracked
Join to unlock this question, detailed solutions, and our complete library of quant finance interview prep.