class Timer(object): def run(self): print('Start...')
run_twice(Timer()) Start... Start...
不要求传入的参数一定是Animal类,只需要含有run()方法就可以了。
Sign in to make a reply
顽皮北极星_
class Timer(object): def run(self): print('Start...')
run_twice(Timer()) Start... Start...
不要求传入的参数一定是Animal类,只需要含有run()方法就可以了。