Fix Python – What are data classes and how are they different from common classes?

With PEP 557 data classes are introduced into python standard library.
They make use of the @dataclass decorator and they are supposed to be “mutable namedtuples with default” but I’m not really sure I understand what this actually means and how they are different from common classes.
What exactly are python data classes and when is it best to us….

Fix Python – How can I create an object and add attributes to it?

I want to create a dynamic object (inside another object) in Python and then add attributes to it.
I tried:
obj = someobject
obj.a = object()
setattr(obj.a, ‘somefield’, ‘somevalue’)

but this didn’t work.
Any ideas?
edit:
I am setting the attributes from a for loop which loops through a list of values, e.g.
params = [‘attr1’, ‘attr2’, ‘attr3’]
ob….