关于python class: callerRef的问题
class A: def __init__(self): self.B_Handle = B_Handle self.VA = "A_init" print "Class A init" def __getattr__(self, name): print "A.__getattr__" print "name=%s" % name def callref(self, callref="A",): print "A.callref = %s" % callref return self.B_Handle.callref(self, callref)class B: def __init__(self): self.VB = "B_init" print self.VB def callref(self, [color=#FF0000]callerRef,[/color] callref): print "B.callref = %s" % callrefB_Handle = B()if __name__ == "__main__": print "eval callerRef start" a = A() a.callref()