今回は、Pythonのdocstring(ドックストリング)についてまとめてみました。 docstringは、Pythonコードの可読性を向上させるための非常に便利なツールです。特に、Pythonを学んでいる方や、コードの品質を向上させたい方にお役に立てればと思い執筆しました。
コードに「説明書(ドキュメント)」を埋め込むための公式な方法です。 三重クォート(""" ... """)の文字列。 コードの説明文で、help()コマンドやツールから読める。 例: def say_hello(): """うさうさ店長があいさつします。""" print("🐇 こんにちは、うさうさ ...
odd length, e.g. length = 9, take the 5th element, at index 4 even, e.g. length = 10, take the 5th and 6th elements, at indices 4 and 5 ...
doxi.nvim is a lightweight Neovim plugin for authoring Python docstring examples as real doctest-style transcripts. It is built for one narrow workflow: select a docstring example region, open a ...
一部の結果でアクセス不可の可能性があるため、非表示になっています。
アクセス不可の結果を表示する