Clarified things . the self-test defined in the docstring to 的定義解決了這些問題。
Performs the conversion of a docstring test 函數(shù)執(zhí)行文檔字符串測試的轉(zhuǎn)換。
Function . the docstring to 函數(shù)中找到這樣一個會話。
Defined in the docstring itself it just removes adjacent newlines 這樣的函數(shù)(它只是除去緊跟在后面的換行)。
Should contain only a set of grammar rules in its docstring no code 在其文檔字符串中應(yīng)該只包含一組語法規(guī)則(沒有代碼)。
Also, since a docstring is-after all-a string escape, sequences like 此外,由于文檔字符串畢竟是字符串換碼(escape),所以
The docstring of each such method contains one or several assignments of patterns to names 每個這樣的方法的文檔字符串都包含一個或多個模式到名稱的分配。
If applied to an assembly at design time, to the helpstring or docstring associated with a type library 復(fù)制到與類型庫相關(guān)聯(lián)的helpstring或docstring。對于類型庫中的
If you do not specify a docstring, the module, class and method names are used as best-available descriptions 如果您沒有指定文檔字符串,類和方法名被用作最合適的描述。
To do this is mostly just a matter of making the docstring look like an interactive shell session; an easy way to do that is to copy-and-paste from a python interactive shell or from idle, pythonwin, macpython, or other ides with interactive sessions 這樣做很像是讓文檔字符串看起來如同一個交互式shell會話;完成這一任務(wù)的一個簡單方法是,從一個python交互式shell中(或者從idel、pythonwin、macpython或者其他帶有交互式會話的ide中)拷貝-粘貼。