3 ms·
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.
by icebraining 12y 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__.