{"id":745,"date":"2024-04-14T11:18:49","date_gmt":"2024-04-14T11:18:49","guid":{"rendered":"https:\/\/javigomez.org\/?p=745"},"modified":"2025-09-29T20:32:51","modified_gmt":"2025-09-29T20:32:51","slug":"06-07-python-clases-herencia-multiple","status":"publish","type":"post","link":"https:\/\/javigomez.org\/index.php\/2024\/04\/14\/06-07-python-clases-herencia-multiple\/","title":{"rendered":"06.08 Python \u2013 Clases &#8211; Herencia m\u00faltiple"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>class Color:\n    def __init__(self,color):\n        self.color=color\n    def __str__(self):\n        return \"Color: \" + self.color\n\nclass Figura:\n    def __init__(self,lado):\n        self.lado=lado\n    def __str__(self):\n        return \"Lado: \" + str(self.lado)\n\nclass Cuadrado(Color,Figura):\n    def __init__(self,textura,color,lado):\n        self.textura=textura\n        Color.__init__(self,color)\n        Figura.__init__(self,lado)\n    def __str__(self):\n        return \"Textura: \" + self.textura + Color.__str__(self) + Figura.__str__(self)\n\nc=Color(\"verde\")\nprint(c)\n\nf=Figura(23)\nprint(f)\n\ncua=Cuadrado(\"liso\",\"amarillo\",66)\n\nprint(cua)\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"PYTHON U06 08 Clases herenciaDoble\" width=\"1200\" height=\"900\" src=\"https:\/\/www.youtube.com\/embed\/sQzC8TqKi50?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[79,185,277],"class_list":["post-745","post","type-post","status-publish","format-standard","hentry","category-python","tag-clases","tag-herencia-multiple","tag-python"],"_links":{"self":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts\/745","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/comments?post=745"}],"version-history":[{"count":1,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts\/745\/revisions"}],"predecessor-version":[{"id":855,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts\/745\/revisions\/855"}],"wp:attachment":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/media?parent=745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/categories?post=745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/tags?post=745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}