
I've written AttributeDict a fair number of times. Each time I write it from scratch, which is only a few lines. And I only make a silly wore about 50% of the time when I do so. I wonder if a separate type in collections might be a more natural way to get the desired effect. I do recognize that such a type is very similar to SimpleNamespace, so get Raymond's concern with making a new thing for trivial change. But the *name* of the class should help with it's purpose IMO. On Wed, Apr 15, 2020, 12:04 AM Raymond Hettinger < raymond.hettinger@gmail.com> wrote:
[GvR]
We should not try to import JavaScript's object model into Python.
Yes, I get that. Just want to point-out that working with heavily nested dictionaries (typical for JSON) is no fun with square brackets and quotation marks.
Raymond _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-leave@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/G5SJKRQ7... Code of Conduct: http://python.org/psf/codeofconduct/