{"id":2086,"date":"2014-02-21T18:14:56","date_gmt":"2014-02-21T09:14:56","guid":{"rendered":"http:\/\/www.whoocus.com\/blog\/?p=2086"},"modified":"2014-02-21T18:31:10","modified_gmt":"2014-02-21T09:31:10","slug":"python3-%e4%ba%8b%e5%a7%8b%e3%82%81","status":"publish","type":"post","link":"https:\/\/www.blowfish.co.jp\/?p=2086","title":{"rendered":"Python3 \u4e8b\u59cb\u3081"},"content":{"rendered":"<p><strong>\u25a0animal.py<\/strong><br \/>\n[python]<br \/>\nclass Animal:<br \/>\n    def __init__(self, name):<br \/>\n        self.name = name<\/p>\n<p>    def call(self):<br \/>\n        print(&#8216;\u3053\u3093\u306b\u3061\u306f\u3002%s \u3055\u3093&#8217; % (self.name))<br \/>\n[\/python]<\/p>\n<p><strong>\u25a0main.py<\/strong><br \/>\n[python]<br \/>\nfrom animal import Animal<br \/>\nfrom person import Person<\/p>\n<p>dog = Animal(&quot;\u72ac&quot;)<br \/>\ncat = Animal(&quot;\u732b&quot;)<br \/>\nmonkey = Animal(&quot;\u733f&quot;)<\/p>\n<p>p1 = Person(&quot;\u592a\u90ce&quot;)<\/p>\n<p>dog.call()<br \/>\ncat.call()<br \/>\nmonkey.call()<br \/>\np1.speak()<br \/>\np1.call()<br \/>\n[\/python]<\/p>\n<p><strong>\u25a0\u51fa\u529b<\/strong><br \/>\n[bash]<br \/>\n\u3053\u3093\u306b\u3061\u306f\u3002\u72ac \u3055\u3093<br \/>\n\u3053\u3093\u306b\u3061\u306f\u3002\u732b \u3055\u3093<br \/>\n\u3053\u3093\u306b\u3061\u306f\u3002\u733f \u3055\u3093<br \/>\n\u79c1\u306f\u592a\u90ce \u3067\u3059\u3002<br \/>\n\u3053\u3093\u306b\u3061\u306f\u3002\u592a\u90ce \u3055\u3093<br \/>\n[\/bash]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u25a0animal.py [python] class Animal: def __init__(self, name): self.name = name def call(self): print(&#8216;\u3053\u3093\u306b\u3061 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"saved_in_kubio":false,"footnotes":""},"categories":[45,4],"tags":[],"class_list":["post-2086","post","type-post","status-publish","format-standard","hentry","category-python","category-tech"],"_links":{"self":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2086","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2086"}],"version-history":[{"count":2,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2086\/revisions"}],"predecessor-version":[{"id":2088,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2086\/revisions\/2088"}],"wp:attachment":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}