Mark Summerfield added the comment: 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. ---------- title: Make object() behave exactly like types.SimpleNamespace() if given kwargs -> Provide a direct function for types.SimpleNamespace() _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22123> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com