I want to add class atttributes to a superclass dynamically. Furthermore, I want to create classes that inherit from this superclass dynamically, and the name of those subclasse
Have a look at the type() builtin function.
knight_class = type('Knight', (Unit,), {})
But in your case, if the subclasses don't implement a different behaviour, maybe giving the Unit
class a name
attribute is sufficient.