Hacker News new | ask | show | jobs
by icebraining 4106 days ago
You could do that by creating an object that encapsulates the dictionary, defines a __call__ method, and repasses the method calls to the underlying dictionary.

That's what a Python object is... The underlying dictionary is called __dict__.