Python Type Checker Comparison: Empty Container Inference
Summary
The article surveys how Python type checkers handle empty container inference, comparing three strategies: infer Any, infer from all usages, and infer from first usage. It discusses trade-offs between safety, precision, and actionable errors, and notes Pyrefly's default first-use approach with an option to disable.