What is the difference between Python registered classes (virtual subclasses) and inherited classes? Why should there be a registered class?

what"s the difference between the following two ways? What is the use of XXX.register compared to inheritance?

@UVW.register
class XYZ(...):
    pass
    
class XYZ(UVW):
    pass
Mar.03,2021

the first is a virtual subclass, which does not inherit any methods or properties from the parent class after registration, so it is called a virtual subclass

.

the second is inheritance, which inherits the things of the parent class

Menu