是否可以将方法作为参数传递给方法?
self.method2(self.method1) def method1(self): return 'hello world' def method2(self, methodToRun): result = methodToRun.call() return result
python parameter-passing
parameter-passing ×1
python ×1