{"height":"190","url":"https://nainaistar.hatenablog.com/entry/should-not-use-mutable-in-python%27s-default-parameter","author_url":"https://blog.hatena.ne.jp/nainaistar/","provider_url":"https://hatena.blog","author_name":"nainaistar","version":"1.0","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/n/nainaistar/20231112/20231112142841.png","provider_name":"Hatena Blog","categories":["Python","\u6280\u8853"],"description":"\u6709\u540d\u306a\u8a71\u3067\u3059\u304c\u30cf\u30de\u3063\u305f\u306e\u3067\u30d6\u30ed\u30b0\u306b\u3057\u307e\u3059\u3002 \u74b0\u5883 Python 3.9 \u4e8b\u8c61 Python\u3067\u30c7\u30d5\u30a9\u30eb\u30c8\u5f15\u6570\u306b\u914d\u5217\u3092\u5b9a\u7fa9\u3059\u308b\u3068\u3001\u610f\u56f3\u305b\u305a\u306b\u540c\u3058\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f7f\u7528\u3057\u3066\u3057\u307e\u3046\u3002 def target_1(value, list=[]): list.append(value) return list def test_01(): a = target_1(\"1\") # [\"1\"] assert len(a) == 1 b = target_1(\"2\") # a, b \u4e21\u65b9\u3068\u3082\u6b21\u306e\u5024\u306b\u306a\u308b # [\"1\", \"2\"] assert len(a) == 2 assert len(b) == 2 # \u30a4\u30f3\u30b9\u30bf\u2026","blog_url":"https://nainaistar.hatenablog.com/","title":"Python\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5f15\u6570\u3067\u306f\u914d\u5217\u3067\u306f\u306a\u304fNone\u3092\u4f7f\u308f\u306a\u3044\u3068\u30c0\u30e1\uff08\u30df\u30e5\u30fc\u30bf\u30d6\u30eb\u306fNG\uff09","width":"100%","blog_title":"\u304d\u308a\u4e38\u306e\u6280\u8853\u65e5\u8a18","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnainaistar.hatenablog.com%2Fentry%2Fshould-not-use-mutable-in-python%2527s-default-parameter\" title=\"Python\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5f15\u6570\u3067\u306f\u914d\u5217\u3067\u306f\u306a\u304fNone\u3092\u4f7f\u308f\u306a\u3044\u3068\u30c0\u30e1\uff08\u30df\u30e5\u30fc\u30bf\u30d6\u30eb\u306fNG\uff09 - \u304d\u308a\u4e38\u306e\u6280\u8853\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","published":"2023-11-13 12:00:00"}