擅长:python、mysql、java
<p>您需要在目录中创建一个(可能是空的)<code>__init__.py</code></p>
<p>请注意,在Python中,没有要求或期望每个类都在自己的文件中,因此如果您只想在同一个文件中创建子类就可以了</p>
<p>另外请注意,参数的更好模式是定义一个默认字典,然后用kwargs中的任何内容更新它:</p>
<pre><code>self.parameters = {
'box': '#AAAAAA',
'axeslabel': '#AAAAAA',
'axes.linewidth': 0.7,
'xtickcolor': '#AAAAAA',
'ytickcolor': 'gray',
...
}
self.parameters.update(kwargs)
</code></pre>