class Dog ():
name = 'Hua Hua'
def sit (self): print ( 'A dog sitting on the ground ' ) def run (self): print ( 'A dog is running ' )
How to call Huahua?
Dog.name >>> 'Flower'
Dog .__ dict __ ['name'] >>> '花花' -----> class attribute dictionary
In fact, the call of point is the call of __dict__ attribute dictionary, the two are equivalent