{"id":1305,"date":"2018-10-15T17:13:44","date_gmt":"2018-10-15T08:13:44","guid":{"rendered":"https:\/\/python-introduction.com\/?p=1305"},"modified":"2018-10-15T17:13:44","modified_gmt":"2018-10-15T08:13:44","slug":"%e3%80%90python%e5%85%a5%e9%96%80%e3%80%91docstring%e3%81%ae%e6%b4%bb%e7%94%a8%e6%b3%95","status":"publish","type":"post","link":"https:\/\/python-introduction.com\/?p=1305","title":{"rendered":"\u3010Python\u5165\u9580\u3011docstring\u306e\u6d3b\u7528\u6cd5"},"content":{"rendered":"<p>\u3053\u306e\u8a18\u4e8b\u3067\u306fPython\u3067\u3088\u304f\u767b\u5834\u3059\u308b<br \/>\ndocstring\u306e\u6d3b\u7528\u6cd5\u306b\u3064\u3044\u3066\u308f\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<h2>\u3010Python\u3011docstring\u306e\u6d3b\u7528\u6cd5<\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/10\/pasokonopnaesa1014.jpg\" alt=\"python docstring\" width=\"620\" height=\"341\" class=\"alignnone size-full wp-image-1278\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/10\/pasokonopnaesa1014.jpg 620w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/10\/pasokonopnaesa1014-300x165.jpg 300w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/p>\n<p>\u307e\u305a\u4f8b\u984c1\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c1\r\n\r\ndef ninzu(kazu1, kazu2):\r\n    &quot;&quot;&quot;\r\n    \u3053\u3053\u3067\u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f3\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u66f8\u304d\u307e\u3059\u3002\r\n    \u305d\u306e\u5834\u5408\u306b\u306f\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f33\u3064\u3067\u304f\u304f\u308c\u3070\u3088\u3044\u3067\u3059\u3002\r\n    \u3053\u306e\u4e2d\u306f\u5b9f\u884c\u3055\u308c\u306a\u304f\u306a\u308a\u307e\u3059\u3002\r\n    \r\n    &quot;&quot;&quot;<\/pre>\n<p>\u307e\u305a<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">def ninzu(kazu1, kazu2):<\/pre>\n<p>\u3068\u3057\u3066\u95a2\u6570\u5b9a\u7fa9\u3092\u304a\u3053\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u300c\u95a2\u6570\u5b9a\u7fa9\u3063\u3066\u4f55\uff1f\u300d\u3068\u6c17\u306b\u306a\u308b\u65b9\u306f<br \/>\n\u3053\u3061\u3089\u306e\u8a18\u4e8b\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<br \/>\n\u21d2<a href=\"https:\/\/python-introduction.com\/?p=1291\" target=\"blank\">\u95a2\u6570\u5b9a\u7fa9\u306b\u3064\u3044\u3066Python\u521d\u5fc3\u8005\u306b\u3082\u308f\u304b\u308b\u3088\u3046\u306b\u89e3\u8aac<\/a><\/p>\n<p>\u3067\u3001\u95a2\u6570\u306e\u4e2d\u306b<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\u3000\u3000&quot;&quot;&quot;\r\n    \u3053\u3053\u3067\u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f3\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u66f8\u304d\u307e\u3059\u3002\r\n    \u305d\u306e\u5834\u5408\u306b\u306f\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f33\u3064\u3067\u304f\u304f\u308c\u3070\u3088\u3044\u3067\u3059\u3002\r\n    \u3053\u306e\u4e2d\u306f\u5b9f\u884c\u3055\u308c\u306a\u304f\u306a\u308a\u307e\u3059\u3002\r\n    \r\n    &quot;&quot;&quot;<\/pre>\n<p>\u3068\u3044\u3063\u305f\u611f\u3058\u3067\u300e\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f33\u3064\u300f\u3092\u3064\u3051\u3066<br \/>\n\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u3046\u3059\u308b\u3053\u3068\u3067\u3001\u5b9f\u884c\u3055\u308c\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067\u306f\u95a2\u6570\u306e\u8aac\u660e\u3092<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">def ninzu(kazu1, kazu2):<\/pre>\n<p>\u306e\u4e0b\u306b\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f33\u3064\u3092\u4f7f\u3063\u3066<br \/>\n\u8a18\u8ff0\u3057\u3066\u3044\u304f\u3068\u3044\u3046\u3053\u3068\u3092\u899a\u3048\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3042\u3068\u3001\u3082\u3046\u4e00\u3064\u77e5\u3063\u3066\u304a\u3044\u3066\u307b\u3057\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u984c2\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c2\r\n\r\ndef ninzu(kazu1, kazu2):\r\n    &quot;&quot;&quot;\r\n    \u3053\u3053\u3067\u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f3\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u66f8\u304d\u307e\u3059\u3002\r\n    \u305d\u306e\u5834\u5408\u306b\u306f\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f33\u3064\u3067\u304f\u304f\u308c\u3070\u3088\u3044\u3067\u3059\u3002\r\n    \u3053\u306e\u4e2d\u306f\u5b9f\u884c\u3055\u308c\u306a\u304f\u306a\u308a\u307e\u3059\u3002\r\n    \r\n    &quot;&quot;&quot;\r\n\r\nprint(ninzu.__doc__)\r\n<\/pre>\n<p>\u4f8b\u984c2\u3092\u5b9f\u884c\u3059\u308b\u3068<\/p>\n<div class=\"boxstyle01\">\n    \u3053\u3053\u3067\u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f3\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u66f8\u304d\u307e\u3059\u3002<br \/>\n    \u305d\u306e\u5834\u5408\u306b\u306f\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f33\u3064\u3067\u304f\u304f\u308c\u3070\u3088\u3044\u3067\u3059\u3002<br \/>\n    \u3053\u306e\u4e2d\u306f\u5b9f\u884c\u3055\u308c\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/div>\n<p>\u3068\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">.__doc__<\/pre>\n<p>\u3068\u3059\u308b\u3053\u3068\u3067\u3001\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f33\u3064\u306e\u4e2d\u8eab\u306e\u8a18\u8ff0\u3092<br \/>\n\u8868\u793a\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">.__doc__<\/pre>\n<p>\u3092\u4ed6\u306e\u30c4\u30fc\u30eb\u3092\u4f7f\u3063\u3066\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u90e8\u5206\u3092\u8aad\u307f\u8fbc\u3093\u3067<br \/>\nhtml\u5316\u3059\u308c\u3070\u3001\u30a6\u30a7\u30d6\u4e0a\u3067\u898b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0a\u3067\u89e3\u8aac\u3092\u7d42\u308f\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u3053\u306e\u8a18\u4e8b\u3067\u306fPython\u3067\u3088\u304f\u767b\u5834\u3059\u308b docstring\u306e\u6d3b\u7528\u6cd5\u306b\u3064\u3044\u3066\u308f\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3057\u307e\u3059\u3002 \u3010Python\u3011docstring\u306e\u6d3b\u7528\u6cd5 \u307e\u305a\u4f8b\u984c1\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002 \u307e\u305a \u3068\u3057\u3066\u95a2\u6570\u5b9a\u7fa9\u3092\u304a\u3053\u306a\u3063\u3066\u3044\u307e\u3059\u3002 \u300c\u95a2\u6570 [&hellip;]","protected":false},"author":1,"featured_media":1276,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16,39],"tags":[136,3],"_links":{"self":[{"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/posts\/1305"}],"collection":[{"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1305"}],"version-history":[{"count":2,"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/posts\/1305\/revisions"}],"predecessor-version":[{"id":1307,"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/posts\/1305\/revisions\/1307"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/media\/1276"}],"wp:attachment":[{"href":"https:\/\/python-introduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}