This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author veky
Recipients eric.snow, rhettinger, v+python, veky, vstinner
Date 2020-04-15.08:50:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1586940624.74.0.135736080662.issue40284@roundup.psfhosted.org>
In-reply-to
Content
I think there is a teaching moment here. I think it's important that no object in Python standard library conflates "item namespace" with "attr namespace". (Maybe that isn't true because of some specialized objects, but surely general ones such as SimpleNamespace shouldn't commit that mistake.)

On the other hand, we do have json in standard library, and JSON is primarily based on JavaScript Object Notation (yes, I know it's been extended to fit more languages, but still, its primal DNA shows). And the conflating of attributes and items is so natural in JS (a['b']===a.b) that it took them more than a decate to realize that separating Map from Object might be a good idea. :-)

So, maybe we should also have something like JSNamespace in stdlib (presumably in json module). But SimpleNamespace shouldn't be it. As Guido once said, a bucket has a handle, and it contains sand, but it doesn't contain a handle.
History
Date User Action Args
2020-04-15 08:50:24vekysetrecipients: + veky, rhettinger, vstinner, v+python, eric.snow
2020-04-15 08:50:24vekysetmessageid: <1586940624.74.0.135736080662.issue40284@roundup.psfhosted.org>
2020-04-15 08:50:24vekylinkissue40284 messages
2020-04-15 08:50:24vekycreate