擅长:python、mysql、java
<p>我倾向于从包含PEP的贡献者策略的已建立项目中查看代码。下面是一些例子:</p>
<p><strong>sklearn:</strong></p>
<ul>
<li><a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/tree/tree.py" rel="nofollow">tree.py</a></li>
<li><a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/logistic.py" rel="nofollow">logistic.py</a></li>
<li><a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/bayes.py" rel="nofollow">bayes.py</a></li>
</ul>
<p><strong>路缘石:</strong><a href="https://github.com/fchollet/keras/blob/master/keras/engine/training.py" rel="nofollow">training.py</a></p>
<p>烧瓶:</strong><a href="https://github.com/pallets/flask/blob/master/flask/sessions.py" rel="nofollow">sessions.py</a></p>
<p>在这里的例子中,Keras和Flask在必要时允许超过80个字符的行,这在其他项目中也很常见。scikit lean似乎完全符合我所看到的例子。</p>
<p>我认为这是docstring:<a href="http://sphinxcontrib-napoleon.readthedocs.org/en/latest/example_google.html" rel="nofollow">Napoleon</a>的一个很好的例子。尽管这是谷歌对docstring的采用,而不是官方的Python。</p>