This kind of micro optimizations don't make much sense in Python. They complicate the code, and you are still 100 times slower than compiled languages.
It really… doesn’t have to complicate. And I disagree that optimising python code is never necessary. Not everybody is writing 100-line one-off glue scripts.
Also, you are somewhat changing the topic from “what is an example of when you might want to is-compare two dicts”, no?
You are correct. I kind of took `is None` for granted as it just feels boilerplate when coding in Python.
Although I have written over a hundred thousand of lines of code in Python over the years; I use Python mostly for dev ops tooling, reporting, monitoring and automation so they don't get super complex and they mostly can lean on procedural programming patterns.
I could imagine complex frameworks needing heavy use of Objects that could lean on the 'is' keyword.