On Wed, 15 Apr 2020 at 15:41, Brett Cannon <br...@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
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/RZQG5BIY4KJA5NIONSXOY4OG26ALZ57G/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to