擅长:python、mysql、java
<p>如果必须,请始终使用下划线<code>_</code>。</p>
<p>使用点<code>.</code>甚至不起作用,否则</p>
<pre><code>from scons.config import whatever
</code></pre>
<p>会崩溃的。</p>
<p>但是<a href="https://www.python.org/dev/peps/pep-0008/#package-and-module-names" rel="noreferrer">PEP 8</a>清楚地描述了它:</p>
<blockquote>
<p>Package and Module Names</p>
<p>Modules should have <strong>short, all-lowercase names</strong>. <em>Underscores</em> <strong>can be used</strong>
in the module name if it <strong>improves readability</strong>. Python <strong>packages</strong> should
also have short, all-lowercase names, although the <strong>use of underscores is
discouraged</strong>.</p>
</blockquote>
<p><strong>更新:</strong></p>
<p>直接针对你的问题:我认为<code>sconsconfig</code>很好。它不太长,可读性很强。</p>
<p>但老实说,我不认为有人会责怪你,如果你使用下划线,你的代码将运行与两个决定。总有一个特定的层次,你不应该再关心<em>那</em>了。</p>