Re:Javascript-Style Objects in Python
by icebraining on Monday March 16, 2015 @01:44PM
(#9212976)
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__.
That's what a Python object is... The underlying dictionary is called __dict__.