2 ms·
If you just want an object that stores a few attributes and you don't want to define a namedtuple, you can use types.SimpleNamespace in Python >= 3.3: https://d
by skrause 10y ago
If you just want an object that stores a few attributes and you don't want to define a namedtuple, you can use types.SimpleNamespace in Python >= 3.3: https://docs.python.org/3.5/library/types.html#types.SimpleNamespace https://docs.python.org/3.5/library/types.html#types.SimpleN...
It's a pretty unknown feature from the stdlib, but sometimes very useful.