
15 Apr
2020
15 Apr
'20
2:58 p.m.
On Wed, 15 Apr 2020 at 15:41, Brett Cannon brett@python.org wrote:
The "hey I'm a dict, but look over hear and now you can treat my like like any other object" duality doesn't sit well with me. I do understand the idea of wanting to convert something to convert JSON data into a more object-like access pattern, though.
I don't like the duality, but I *do* like (in some situations) the object-with-dynamic-attributes style of access. Basically, when access is predominantly via literal strings and heavily nested,
obj["element"]["sub"]["another"]
is *far* more punctuation-heavy and (IMO) difficult to read as a consequence, than
obj.element.sub.another
Paul