Note that a method (Method) can directly plug B as a parameter of the interface. A lot of code is written less than C . Class CLSA: DEF WHOAMI (Self, V1 = "V1"): "" "" "" "" "" "" "" "" PRINT "I am A"
Class CLSB: Def Eval (Self, Fn): Fn ()
IF __NAME __ == "__ main__": a = CLSA () B = CLSB () B.Eval (a.WhoAmi) Print A.WhoAmi .__ DOC__PRINT A.WhoAmi .__ name__ print a.Whoami .__ DICT__