Starting this as a new thread for the interested reader:

On 17.02.21 11:18, Chris Angelico wrote:
On Wed, Feb 17, 2021 at 9:11 PM Sven R. Kunze <srku...@mail.de> wrote:
Still think that "object()" should be writable since this seems like an
arbitrary restriction (+SimpleNamespace is no builtin and at least I
would use object() for fast PoCs or dirty hackery). But I guess there's
been discussion around this already.

[...]

Using SimpleNamespace is the best way to do this, and maybe there's a
good argument for making it a builtin (or at least giving it a shorter
name), but changing object would be problematic.

I would be skeptical that either those ideas would help a lot. My reasoning is the following:


Given the usual terminology in computer science and programming courses, we think in "objects". "Namespaces" on the other side are quite static, usual representing surroundings or environments which in turn can contain "objects". Sadly, the terminology-wise ideal solution is blocked by technical reasons.


The thinking in the concepting use-case goes like "I need a blank object which I can do random things with" (yes, including attaching new attributes to it, maybe other stuff as well).

The thinking "hey I need a (simple) namespace which I can attach attributes to" requires quite some thoughts especially when being in a more "concepting"/"trying out ideas" mood.

In this phase, one does not simply know what one needs ("could be sentinel only", "could be data carrying", "could be signalling", "could something else") and things move quickly.


So, just as an example when renaming/aliasing "types.SimpleNamespace" to "builtins.thing", my expectation would be that people could be horribly confused seeing "object" and "thing" being a builtin when used in a project simultaneously. This always leads to questions like "what to use now?"


As a conclusion I would say let's leave it like it is since it's a minor issue.


Best
Sven
_______________________________________________
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/3IICAAKFYPL7JETS26CHPUVRVQS7KW3Y/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to