I haven't tried it but type hints are probably smart enough to find errors like this statically with namedtuple, but probably not so with a dict.
1: https://www.python.org/dev/peps/pep-0589/
Reply on news.ycombinator.com