擅长:python、mysql、java
<p>除了PEP-8之外,您还可以查看本机Python模块如何处理这个问题。</p>
<p>如果您将<a href="https://docs.python.org/2/py-modindex.html" rel="noreferrer">the native modules of Python 2</a>与<a href="https://docs.python.org/3/py-modindex.html" rel="noreferrer">that of Python 3</a>进行比较,您会发现官方dev的新趋势是避免使用大写和下划线。例如,Python 2中的<code>ConfigParser</code>在Python 3中变为<code>configparser</code>。</p>
<p>考虑到这一点,最好的做法是避免大写和下划线,只需将单词连接在一起,即<code>sconsconfig</code>。</p>