A deep understanding of object-oriented

Dict object does not inherit the value of the yuan class

init

Dict point value of the object is instantiated object namespace

Namespace class is the class of point dict

dict this is no new dictionary will only assignment in the args

call when the object is bracketed call trigger, not the dictionary dict,

 

Objects inherit metaclasses

init method metaclasses

The args parameter is the name of the property to inherit the class and metaclass. The base class. Namespace class. Note that the class is not instantiated namespace attributes property is worth, there is a init of self is an instance of the object of this class

Method new metaclasses

The args parameter is the name of the property to inherit the class and metaclass. The base class. Namespace class. Note that the class is not instantiated namespace attributes property is worth, there is a init of cls cls is this class can be instantiated objects

call method metaclasses

init args is after this class is instantiated in the Zodiac, but if we want to instantiate the control class, you can call methods

 

 

 

Guess you like

Origin www.cnblogs.com/cherish937426/p/11562969.html