> you have to do foo.get('bar')... or in some cases getattr(foo, 'bar', None)
This is a mistake based on thinking in Javascript: in JS the index operator is effectively the same as the dot operator, for example foo[“bar”] == foo.bar. In Python those are different. [] corresponds to get in dicts, and . corresponds to getattr in objects.
My personal biggest gripe with Python is that there isn’t a better story for typing as I’m spoiled by TypeScript and static languages that have a better development experience and prevent certain classes of mistakes.