On 2021-02-17 11:21, Chris Angelico wrote:
Okay. Let's start bikeshedding. If SimpleNamespace were to become a
builtin, what should its name be? It needs to be short (obviously),
but not TOO short, and it needs to be at least somewhat descriptive,
and it needs to not cause confusion with "object". Ideally, it should
get a name that's unlikely to conflict with names already in frequent
use.
Thinking about this more, I think the main obstacle to use of
SimpleNamespace isn't the name, it's its the location. No one is going
to look in the types module for something like this.
Why not just put SimpleNamespace in the collections module? The one in
types could be aliased to it (or vice versa if we really don't want to
change anything). That seems like it's a trivial change that would
greatly increase discoverability of SimpleNamespace without adding
complexity of any kind.
--
Brendan Barnwell
"Do not follow where the path may lead. Go, instead, where there is no
path, and leave a trail."
--author unknown
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/MZZBSWZP3EC3AEFW46RDAMO77VTYOKGP/
Code of Conduct: http://python.org/psf/codeofconduct/