The default python interpreter will slow you down.
Instead, let the code crash, see what exception is raised, and only handle that.
I regularly see people assume that they can't write a_dict == other_dict, especially when coming from C++.
Try it — it works! :)