docstrings
美
英 
- 網(wǎng)絡(luò)文檔字符串;文檔注釋;文件字串
例句
it's good practice to include docstrings in code that you write, so make a habit of it.
在您編寫的代碼中加入文檔字符串是個(gè)很好的做法,因此請(qǐng)養(yǎng)成編寫文檔字符串的習(xí)慣。
First, much of the work done by a concrete class is specified in the docstrings of methods.
首先,具體類所完成的大部分工作都在方法的文檔字符串(docstring)中指定。
The docstrings processed by doctest can contain tracebacks within them, but a better approach to special cases is to utilize unittest.
由doctest處理的文檔字符串可能會(huì)在其內(nèi)部包含回溯(traceback),但是在特別的情況下,更好的方法是使用unittest。
The main element of good Python documentation is the use of so-called "docstrings. "
Python文檔之所以“優(yōu)秀”的主要因素是使用所謂的“docstring”。
If you follow the standard Python coding conventions using Docstrings, you will automatically have a solid foundation for documentation.
如果通過使用Docstring遵守標(biāo)準(zhǔn)的Python代碼約定,就為生成文檔建立了牢固的基礎(chǔ)。
When they occur inside of docstrings inside of Python source code, like in the second example, they are called doctests.
當(dāng)它們出現(xiàn)在Python源代碼中的docstring中時(shí)(比如第二個(gè)示例),它們就被稱為doctest。