mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
55801b28f5
* add callback test * def test(a=1, b='test') for default is ok * getNodeAttr
23 lines
391 B
Python
23 lines
391 B
Python
class Demo():
|
|
def __init__(self):
|
|
print("__init__")
|
|
self.funcs = []
|
|
self.funcs.append(self.a)
|
|
self.funcs.append(self.b)
|
|
|
|
def a(self):
|
|
print('a')
|
|
|
|
def b(self):
|
|
print('b')
|
|
|
|
def get_funcs(self):
|
|
return self.funcs
|
|
|
|
|
|
demo = Demo()
|
|
funcs = demo.get_funcs()
|
|
print('----------------------------')
|
|
for func in funcs:
|
|
func()
|