News for hackers. Stuff that matters.
Re:Box: Python dictionaries with recursive dot notation access by crdoconnor on Friday May 05, 2017 @12:33PM (#14274697)
True, but it saves a relatively small number of chars (~12) and does so at the same time as:

A) Giving off a signal that you're dealing with an object rather than a dict.

B) Making it cumbersome to swap out some of those selectors with variables.

C) Making it difficult to deal with the attribute not being there (with a dict you can say .get("attr2", {}) and it returns a default.

Re:Box: Python dictionaries with recursive dot notation access by yeukhon on Friday May 05, 2017 @09:49PM (#14278229)
I understand. I have another motivation which is getting JSON and wanting a OOP object to mainpluate with. Take AWS' boto3 response. Well documented but the nested response structure gives me a chill and I wish there's a direct object out of the JSON. I instead had to write my own class for the conversion. If I could mainpluate dict like mainpluatig attribute in a class then I could just write my function's contract "input is a response object from X APi" instead of "dict of this form."

Quite annoying and I know some people considered what I wish is a bad practice.