lyon 994bb3bdc5 add weakref
add PikaUI test

test PikauI_core passed

save host_obj on methodArg

support save host_obj for method
2023-02-11 00:58:58 +08:00

38 lines
662 B
Python

class Demo():
def __init__(self):
print("__init__")
self.funcs = []
self.funcs.append(self.a)
self.funcs.append(self.b)
self.funcs.append(self.c)
self.val = 'ppp'
def a(self):
print('a')
def b(self):
print('b')
def c(self):
print(self.val)
def get_funcs(self):
return self.funcs
class Test():
def funcs_test(self):
demo = Demo()
funcs = demo.get_funcs()
print('----------------------------')
for func in funcs:
demo.func = func
demo.func()
func()
test = Test()
test.funcs_test()