{"blog_title":"atsuoishimoto's diary","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fatsuoishimoto.hatenablog.com%2Fentry%2F2019%2F09%2F06%2F115651\" title=\"Python 3.8 \u306e\u6982\u8981 (\u305d\u306e2) - Positional-only parameters - atsuoishimoto&#39;s diary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_url":"https://blog.hatena.ne.jp/atsuoishimoto/","published":"2019-09-06 11:56:51","url":"https://atsuoishimoto.hatenablog.com/entry/2019/09/06/115651","version":"1.0","image_url":null,"categories":[],"author_name":"atsuoishimoto","provider_name":"Hatena Blog","title":"Python 3.8 \u306e\u6982\u8981 (\u305d\u306e2) - Positional-only parameters","width":"100%","description":"Python 3.0 \u4ee5\u964d\u3067\u306f\u3001\u95a2\u6570\u3092\u5b9a\u7fa9\u3059\u308b\u3068\u304d\u306b\u3001\u30ad\u30fc\u30ef\u30fc\u30c9\u5c02\u7528\u5f15\u6570 \u3092\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 def func(a, b, *, c=1, d=2): return a+b+c+d \u3053\u3093\u306a\u306e\u3067\u3059\u306d\u3002\u5f15\u6570\u306e\u30ea\u30b9\u30c8\u306b * \u304c\u3042\u308b\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u3068\u304d\u3001* \u306e\u5f8c\u308d\u306b\u3042\u308b\u5f15\u6570\u306e\u5024\u306f\u3001\u304b\u306a\u3089\u305a\u30ad\u30fc\u30ef\u30fc\u30c9\u5f15\u6570\u3068\u3057\u3066\u6307\u5b9a\u3057\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093\u3002 \u2191\u306e\u95a2\u6570\u3060\u3068\u3001\u5f15\u6570 c \u306f\u30ad\u30fc\u30ef\u30fc\u30c9\u5f15\u6570\u3067\u6307\u5b9a\u3059\u308c\u3070\u3061\u3083\u3093\u3068\u52d5\u304d\u307e\u3059\u3002 >>> func(1, 2, c=10) 15 \u3057\u304b\u3057\u3001\u30ad\u30fc\u30ef\u30fc\u30c9\u306a\u3057\u3067\u547c\u3073\u51fa\u3059\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002 >>> func(1, 2, 10) Traceback (most recent c\u2026","type":"rich","height":"190","blog_url":"https://atsuoishimoto.hatenablog.com/","provider_url":"https://hatena.blog"}