Any instance can have a name attribute. Looks like you might be asking how to dynamically name a class, not an instance. In this case, you can explicitly specify the __name__ attribute of the class, or even better, create a class with a built-in type (with 3 arguments).
class Ungulate(Mammal): hoofed = True
will be equivalent
cls = type('Ungulate', (Mammal,), {'hoofed': True})
source share