18 Feb
2021
18 Feb
'21
10:51 a.m.
Hello,
On Thu, 18 Feb 2021 21:27:18 +1100
Steven D'Aprano
Or we could just use a one-liner:
>>> from types import SimpleNamespace
and get all of that for free. And if it were a builtin, it would be a zero-liner.
Right. If the whole CPython stdlib were builtin, it all would be zero-liner. But it's not, and won't be. Even such important things as OrderedDict and namedtuple live in a module. So, SimpleNamespace will hopefully remain there too. And good luck with renaming it to something not obscure. My bet is on AttrObject ;-). [] -- Best regards, Paul mailto:pmiscml@gmail.com