问题 Can you spot the error in the code below? Mypy can't. from typing import Dict, Any def add_items(d: Dict[str, Any]) -> None: d['foo'] = 5 d: Dict[str, str] = {} add_items(d) for key, value in d.items(): print(f"{repr(key)}: {repr(value.lower())}") Python spots the error, of course, helpfully informing us that 'int' object has no attribute 'lower' . Too bad it can't tell us this until run time. As far as I can tell, mypy doesn't catch this error because it allows arguments to the d parameter