擅长:python、mysql、java
<p>在<code>some_method_here</code>中,添加将在<code>super()</code>调用中使用的参数<code>tester</code>:</p>
<pre><code>def some_method_here(tester):
print '200 instead but do not print 100'
super(type(tester), tester).run()
</code></pre>
<p>然后,要获得插入了正确的<code>tester</code>参数的callable,请执行以下操作:</p>
<pre><code>from functools import partial
tester = factory.GetTester()
tester_method_here = partial(some_method_here, type=tester)
tester.run = tester_method_here
</code></pre>