I changed my suggestion but did so on the mailing list instead of here:
This (importing & using types.SimpleNamespace()) is too much for children (& beginners).
But perhaps what I should be asking for is for a new built-in that does what types.SimpleNamespace() does, so that without any import you can write, say,
foo = namespace(a=1, b=2)
# or
bar = namespace()
bar.a = 1
where under the hood namespace has the same behavior as types.SimpleNamespace().
Naturally, I understand that adding a new name is a big deal and may be too much to ask for beginners.
I've renamed the issue to reflect this (although I don't know if that will work).
Alternatively, I (or someone) could just close the issue as "won't fix"; it was just an idea. |