擅长:python、mysql、java
<p>PEP257规定对docstring使用“三重双引号”。在docstring中不必包含''triple single quotes''或''single double quotes''。有一个困难,我们有类docstrings、函数docstrings、模块docstrings、属性docstrings和其他docstring。这就是为什么我决定将docstring考虑为以下更容易:</p>
<pre><code>syn region pythonDocString start=+^\s*"""+ end=+"""+ keepend contains=...
</code></pre>
<p>然后:</p>
^{pr2}$
<p>您可以在这个脚本中看到示例(search pythonDocString):<a href="https://github.com/andbar-ru/python-syntax/blob/master/syntax/python.vim" rel="nofollow noreferrer">https://github.com/andbar-ru/python-syntax/blob/master/syntax/python.vim</a></p>