[issue40284] Add mapping methods to types.SimpleNamespace
STINNER Victor
report at bugs.python.org
Tue Apr 14 17:31:02 EDT 2020
STINNER Victor <vstinner at python.org> added the comment:
I would prefer that SimpleNamespace remains as simple as it is:
https://docs.python.org/dev/library/types.html#types.SimpleNamespace
"A simple object subclass that provides attribute access to its namespace"
If you want to add the mapping protocol, I suggest you to create your own subclass and add the methods that you want.
----------
nosy: +vstinner
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40284>
_______________________________________
More information about the Python-bugs-list
mailing list