On the metaclass (personal understanding)

On the metaclass (personal understanding)


We know that everything is in python objects (object), then so some objects have become the object of a subclass, then the object class in turn, who created it?

In fact, the ability to create classes of class, called the metaclass. There is a concept: Yuan class creates a class object, but it is also a subclass of object class (which is what the hell we are not to consider this logic, and has the perfect solution chicken or the egg question? ).

The actual dollar class or all the classes of the creator, even if all of the classes (including its own meta-class) is a subclass of object, and their relationship is as follows:

Interesting......

Guess you like

Origin www.cnblogs.com/Du704/p/11529024.html