Using dict as object

2012-09-19 Thread Pierre Tardy
One thing that is cooler with java-script than in python is that dictionaries and objects are the same thing. It allows browsing of complex hierarchical data syntactically easy. For manipulating complex jsonable data, one will always prefer writing: buildrequest.properties.myprop rather than brd

Re: Using dict as object

2012-09-19 Thread Pierre Tardy
> > This has been proposed and discussed and even implemented many > times on this list and others. > I can find this question on SO http://stackoverflow.com/questions/4984647/accessing-dict-keys-like-an-attribute-in-python which is basically answered with this solution class AttributeDict(dict):