Aug. 18, 2023
8:47 p.m.
The point of type checkers is to identify potential runtime errors before they happen, no? It's of course easy to create an object that you can assign anything to: from typing import Any x: Any x.my_random_attr = "foo" # no complaint from type checker But then you might do this later: print(x.my_random_atr) # note that I misspelled it And because `x` is Any, the type checker can't catch the potential runtime error for you.