{"id":3601,"date":"2025-04-23T10:07:22","date_gmt":"2025-04-23T01:07:22","guid":{"rendered":"https:\/\/www.dogrow.net\/python\/?p=3601"},"modified":"2025-05-22T20:01:37","modified_gmt":"2025-05-22T11:01:37","slug":"blog129-%e3%83%87%e3%82%a3%e3%82%af%e3%82%b7%e3%83%a7%e3%83%8a%e3%83%aa%e5%9e%8b%e3%83%87%e3%83%bc%e3%82%bf%e3%81%ae%e3%82%a2%e3%83%b3%e3%83%91%e3%83%83%e3%82%af%e6%a7%8b%e6%96%87","status":"publish","type":"post","link":"https:\/\/www.dogrow.net\/python\/blog129-%e3%83%87%e3%82%a3%e3%82%af%e3%82%b7%e3%83%a7%e3%83%8a%e3%83%aa%e5%9e%8b%e3%83%87%e3%83%bc%e3%82%bf%e3%81%ae%e3%82%a2%e3%83%b3%e3%83%91%e3%83%83%e3%82%af%e6%a7%8b%e6%96%87\/","title":{"rendered":"(129) \u30c7\u30a3\u30af\u30b7\u30e7\u30ca\u30ea\u578b\u30c7\u30fc\u30bf\u306e\u30a2\u30f3\u30d1\u30c3\u30af\u69cb\u6587"},"content":{"rendered":"<h3 class=\"my_h\">(1) \u4fbf\u5229\u306a\u4f7f\u3044\u65b9 \u305d\u306e1<\/h3>\n<p>\u3053\u3093\u306a\u95a2\u6570\u304c\u3042\u308b\u3068\u3059\u308b\u3002<\/p>\n<pre class=\"my_pre_python\">\r\ndef my_func( aaa, bbb ):\r\n    return aaa + bbb\r\n<\/pre>\n<p>\u666e\u901a\u306b\u4f7f\u3048\u3070\u3053\u3046\u547c\u3073\u51fa\u3059\u3002<\/p>\n<pre class=\"my_pre_python\">\r\nmy_func( 10, 30 )\r\nmy_func( aaa=10, bbb=30 )\r\nmy_func( bbb=30, aaa=10 )\r\n<\/pre>\n<p>\u3053\u306e\u3068\u304d\u3001<br \/>\n<span class='my_fc_deeppinkBBig'>\u30c7\u30a3\u30af\u30b7\u30e7\u30ca\u30ea\u578b\u30c7\u30fc\u30bf\u3092\u4f5c\u3063\u3066\u304a\u304d\u3001<br \/>\n\u3000\u305d\u308c\u3092\u30a2\u30f3\u30d1\u30c3\u30af\u3057\u3066\u95a2\u6570\u306b\u6e21\u3059\u3002<\/span><br \/>\n\u3068\u3044\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n<pre class=\"my_pre_python\">\r\nccc = {\"aaa\": 10, \"bbb\": 30}\r\nmy_func( **ccc )\r\n<\/pre>\n<p><span class='my_fc_deeppinkBBig'>**<\/span> \u304c\u30a2\u30f3\u30d1\u30c3\u30af\u69cb\u6587\u3060\u3002<br \/>\n\u30a2\u30f3\u30d1\u30c3\u30af\u3055\u308c\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u95a2\u6570\u306e\u5f15\u6570\u3068\u3057\u3066\u5c55\u958b\u3055\u308c\u308b\u3002<\/p>\n<pre class=\"my_pre_python\">\r\nmy_func( aaa=10, bbb=30 )\r\n<\/pre>\n<p><span class='my_fc_deeppinkBBig'>\u5f15\u6570\u306e\u6570\u304c\u591a\u304f\u306a\u3063\u305f\u3068\u304d\u306b\u4fbf\u5229\u3060\u3002<\/span><\/p>\n<h3 class=\"my_h\">(2) \u4fbf\u5229\u306a\u4f7f\u3044\u65b9 \u305d\u306e2<\/h3>\n<p>\u3053\u3093\u306a\u95a2\u6570\u304c\u3042\u308b\u3068\u3059\u308b\u3002<\/p>\n<pre class=\"my_pre_python\">\r\ndef show_profile( **ppp ):\r\n    for key, value in ppp.items():\r\n        print(f\"{key}: {value}\")\r\n<\/pre>\n<p>\u901a\u5e38\u306f\u95a2\u6570\u5074\u3067\u5f15\u6570\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u308b\u304c\u3001\u3053\u306e\u4f7f\u3044\u65b9\u3067\u306f <span class='my_fc_deeppinkBBig'>\u4efb\u610f\u306e\u6570\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u6e21\u305b\u308b\u3002<\/span><\/p>\n<pre class=\"my_pre_python\">\r\nshow_profile( aaa=\"AAA\", bbb=\"ZZZ\", ccc=\"VVV\" )\r\n<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3002<\/p>\n<pre class=\"my_pre_python\">\r\naaa: AAA\r\nbbb: ZZZ\r\nccc: VVV\r\n<\/pre>\n<h3 class=\"my_h\">(3) \u4fbf\u5229\u306a\u4f7f\u3044\u65b9 \u305d\u306e3<\/h3>\n<p>\u8907\u6570\u306e dictionary\u578b\u30c7\u30fc\u30bf\u3092\u307e\u3068\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<br \/>\n\u5358\u7d14\u306a\u9023\u7d50\u3067\u306f\u306a\u304f\u3001<span class='my_fc_deeppinkBBig'>\u30ad\u30fc\u304c\u91cd\u8907\u3057\u3066\u3044\u308c\u3070\u3001\u5f8c\u306b\u6307\u5b9a\u3057\u305f\u65b9\u3067\u4e0a\u66f8\u304d<\/span> \u3055\u308c\u308b\u3002<\/p>\n<pre class=\"my_pre_python\">\r\ndefaults      = {'language': 'ja', 'theme': 'light'}\r\nuser_settings = {'language': 'en'}\r\n\r\nsettings = {**defaults, **user_settings}\r\nprint(settings)\r\n<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\u306f\u3053\u3046\u306a\u308b\u3002ja \u304c en \u3067\u4e0a\u66f8\u304d\u3055\u308c\u305f\u3002<\/p>\n<pre class=\"my_pre_python\">\r\n{'language': 'en', 'theme': 'light'}\r\n<\/pre>\n<hr class=\"my_hr_bottom\">\n","protected":false},"excerpt":{"rendered":"<p>(1) \u4fbf\u5229\u306a\u4f7f\u3044\u65b9 \u305d\u306e1 \u3053\u3093\u306a\u95a2\u6570\u304c\u3042\u308b\u3068\u3059\u308b\u3002 def my_func( aaa, bbb ): return aaa + bbb \u666e\u901a\u306b\u4f7f\u3048\u3070\u3053\u3046\u547c\u3073\u51fa\u3059\u3002 my_func( 10, 30 ) my_func(\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.dogrow.net\/python\/blog129-%e3%83%87%e3%82%a3%e3%82%af%e3%82%b7%e3%83%a7%e3%83%8a%e3%83%aa%e5%9e%8b%e3%83%87%e3%83%bc%e3%82%bf%e3%81%ae%e3%82%a2%e3%83%b3%e3%83%91%e3%83%83%e3%82%af%e6%a7%8b%e6%96%87\/\">\u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[40],"tags":[],"class_list":["post-3601","post","type-post","status-publish","format-standard","hentry","category-40"],"views":629,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/posts\/3601","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/comments?post=3601"}],"version-history":[{"count":11,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/posts\/3601\/revisions"}],"predecessor-version":[{"id":3680,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/posts\/3601\/revisions\/3680"}],"wp:attachment":[{"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/media?parent=3601"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/categories?post=3601"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/tags?post=3601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}