擅长:python、mysql、java
<p>应该简单到:</p>
<pre class="lang-py prettyprint-override"><code>
my_max = get_max_from_config_or_wherever()
@troupe(max_count = my_max, idle_count = 2)
class Calculation(ActorTypeDispatcher):
...
</code></pre>
<p>需要记住的是<code>class</code>和<code>def</code>语句本身是执行的。你知道吗</p>