{"provider_url":"https://hatena.blog","url":"https://raspberrypi.hatenadiary.com/entry/python-class-inheritance","blog_url":"https://raspberrypi.hatenadiary.com/","author_name":"raspberrypi","title":"python3\uff1a\u30af\u30e9\u30b9\u306e\u7d99\u627f","published":"2019-12-02 19:10:42","blog_title":"Raspberry Pi & Python \u958b\u767a\u30d6\u30ed\u30b0 \u2606\u5f61","version":"1.0","author_url":"https://blog.hatena.ne.jp/raspberrypi/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fraspberrypi.hatenadiary.com%2Fentry%2Fpython-class-inheritance\" title=\"python3\uff1a\u30af\u30e9\u30b9\u306e\u7d99\u627f - Raspberry Pi &amp; Python \u958b\u767a\u30d6\u30ed\u30b0 \u2606\u5f61\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","width":"100%","description":"\u30d6\u30ed\u30b0\u7ba1\u7406\u8005\u306eP.H\u3067\u3059\uff01 \u4eca\u56de\u306f\u30af\u30e9\u30b9\u306e\u7d99\u627f\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u30af\u30e9\u30b9\u540d\u306e\u5f8c\u306b\u7d99\u627f\u3057\u305f\u3044\u30af\u30e9\u30b9\u540d\u3092\u66f8\u304f\u3053\u3068\u3067\u3001\u7d99\u627f\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u30af\u30e9\u30b9\u306e\u7d99\u627f \u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9 MyClassA\u3092\u7d99\u627f\u3057\u305fMyClassB\u3092\u4f5c\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306b\u306a\u308a\u307e\u3059\u3002 \u30af\u30e9\u30b9\u306e\u7d99\u627f class MyClassA: def __init__(self): self.nameA = \"\" def get_nameA(self): return self.nameA def set_nameA(self, name): self.nameA = name class MyClassB(MyClassA): # My\u2026","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/r/raspberrypi/20200129/20200129235144.jpg","type":"rich","categories":["python"],"provider_name":"Hatena Blog"}