{"id":3456,"date":"2020-07-04T14:55:49","date_gmt":"2020-07-04T09:25:49","guid":{"rendered":"http:\/\/www.pythonpool.com\/?p=3456"},"modified":"2024-01-01T12:25:04","modified_gmt":"2024-01-01T06:55:04","slug":"python-super","status":"publish","type":"post","link":"https:\/\/www.pythonpool.com\/python-super\/","title":{"rendered":"Introduction to Python Super With Examples"},"content":{"rendered":"\n<p>We all have must use Inheritance at some point in time or at least have heard how useful it is any object-oriented programming language. It allows one class (derived class) to obtain all the parent (base) class properties. The derived class can access the base class variables, methods. And to access the methods of the base inside the derived class, we have python super method.<\/p>\n\n\n\n<p><strong>This Python super() method is a built-in method that creates a proxy object (temporary object) inside the derived class. To understand it better, we can think of it as a way to access the methods of the superclass(base) from the derived class. If you are thinking about what we will do by accessing those methods, trust me, it all depends on our imagination how well we use it. And this question of you will surely be answered by the end of this article.<\/strong><\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_74 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #990303;color:#990303\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #990303;color:#990303\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.pythonpool.com\/python-super\/#Python_Super_in_Different_Levels_of_Inheritance\" >Python Super in Different Levels of Inheritance<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.pythonpool.com\/python-super\/#1_Python_super_in_Single_Inheritance\" >1. Python super() in Single Inheritance<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.pythonpool.com\/python-super\/#2_Python_in_Multilevel_Inheritance\" >2. Python in Multilevel Inheritance<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.pythonpool.com\/python-super\/#3_Python_Super_in_Multiple_Inheritance\" >3. Python Super() in Multiple Inheritance<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.pythonpool.com\/python-super\/#Method_Resolution_Order\" >Method Resolution Order<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.pythonpool.com\/python-super\/#Must_Read\" >Must Read<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.pythonpool.com\/python-super\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-python-super-in-different-levels-of-inheritance\"><span class=\"ez-toc-section\" id=\"Python_Super_in_Different_Levels_of_Inheritance\"><\/span>Python Super in Different Levels of Inheritance<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Following are the different levels of inheritance using super &#8211;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-1-python-super-in-single-inheritance\"><span class=\"ez-toc-section\" id=\"1_Python_super_in_Single_Inheritance\"><\/span>1. Python super() in Single Inheritance<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In single Inheritance, there is only one base class and one derived class. And in Python, each class has a constructor named __<strong>init__<\/strong>. To know more about the __<strong>init__<\/strong>, refer to this article &#8211; <a href=\"http:\/\/www.pythonpool.com\/init-python\/\">http:\/\/www.pythonpool.com\/init-python\/<\/a><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nclass Vehicle:\n  def __init__(self,name,gear,model):\n    self.name=name\n    self.gear=gear\n    self.model=model\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nclass Car(Vehicle):\n  def __init__(self,name,gear,model,types):\n  # calling the __init__ method of the superclass\n     super().__init__(name,gear,model)\n     self.types=types\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ncar1=Car(&quot;car&quot;,'5','2010',&quot;hatchback&quot;)\ncar2=Car(&quot;car&quot;,'5','2003',&quot;Sedan&quot;)\nprint(&quot;The number of gear in car1&quot;,car1.gear)\nprint(&quot;Car1 model year&quot;,car1.model)\nprint(&quot;Type of car1&quot;,car1.types)\nprint(&quot;The number of gear in car2&quot;,car2.gear)\nprint(&quot;Car2 model year&quot;,car2.model)\nprint(&quot;Type of car2&quot;,car2.types)\n<\/pre><\/div>\n\n\n<pre class=\"wp-block-preformatted\">Output-\nThe number of gear in car1 5\nCar1 model year 2010\nType of car1 hatchback\nThe number of gear in car2 5\nCar2 model year 2003\nType of car2 Sedan<\/pre>\n\n\n\n<p>We can also do-<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nclass Vehicle:\n  def __init__(self,name,gear,model):\n    self.name=name\n    self.gear=gear\n    self.model=model\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nclass Car(Vehicle):\n   def __init__(self,name,gear,model,types):\n   # calling the__init__ method of the superclass\n       Vehicle.__init__(self,name,gear,model)\n       self.types=types\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ncar1=Car(&quot;car&quot;,'5','2010',&quot;hatchback&quot;)\ncar2=Car(&quot;car&quot;,'5','2003',&quot;Sedan&quot;)\nprint(&quot;The number of gear in car1&quot;,car1.gear)\nprint(&quot;Car1 model year&quot;,car1.model)\nprint(&quot;Type of car1&quot;,car1.types)\nprint(&quot;The number of gear in car2&quot;,car2.gear)\nprint(&quot;Car2 model year&quot;,car2.model)\nprint(&quot;Type of car2&quot;,car2.types)`\n<\/pre><\/div>\n\n\n<pre class=\"wp-block-preformatted\">Output-<br>The number of gear in car1 5<br>Car1 model year 2010<br>Type of car1 hatchback<br>The number of gear in car2 5<br>Car2 model year 2003<br>Type of car2 Sedan<\/pre>\n\n\n\n<p><br>But suppose we want to change the Parent class, think, to a class named four-wheelers. And if we have used the second approach, we would have to change it everywhere we have used the Vehicle.__<strong>init<\/strong>__(). So, using super is the best option available.<\/p>\n\n\n\n<p>Note &#8211; super() has two parameters. If we do not value these parameters, the default values here will be super(Car, self). Here the first argument is the subclass, and second is the instance of the subclass.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-2-python-in-multilevel-inheritance\"><span class=\"ez-toc-section\" id=\"2_Python_in_Multilevel_Inheritance\"><\/span>2. Python in Multilevel Inheritance<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>There is a base class A, a derived class B, which is the base class to C and a derived class C in multilevel Inheritance.<br>Here, we can create a program that will calculate the age of the father and Grandfather(Note that here we have assumed that the age of a father is 25 more than child and age of grandfather is 25 more than the father.) This is quite an unrealistic example, but I think it will help you understood the working of super() better.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nclass GrandFather:\n  def __init__(self): \n    print('GrandFather born')\n  def calculate_age(self, age):\n    print('Age of GrandFather', age)\n\nclass Father(GrandFather):\n  def __init__(self):\n    super().__init__()\n    print('Father born')\n  def calculate_age(self, age):\n    super().calculate_age(age + 25)\n    print('Age of Father', age)\n\nclass Child(Father):\n  def __init__(self):\n    super().__init__()\n    print('Child born')\n  def calculate_age(self, age):\n    super().calculate_age(age + 25)\n    print('Age of Child:', age)\n\nc = Child()\nc.calculate_age(18)\n<\/pre><\/div>\n\n\n<pre class=\"wp-block-preformatted\">Output-\nGrandFather born\nFather born\nChild born\nAge of GrandFather 68\nAge of Father 43\nAge of Child: 18<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-3-python-super-in-multiple-inheritance\"><span class=\"ez-toc-section\" id=\"3_Python_Super_in_Multiple_Inheritance\"><\/span>3. Python Super() in Multiple Inheritance<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p> In multiple Inheritance, we have one derived class and more than one base class. For example- A child derives properties from mother and father. Now let us see how super() can help us in multiple <a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Inheritance_(object-oriented_programming)\" target=\"_blank\" rel=\"noreferrer noopener\">Inheritance<\/a>. <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nclass Animal: \n  def __init__(self, name):\n    print(name, 'is an animal.')\n\nclass CannotFly(Animal):\n  def __init__(self,name):\n    print(name, &quot;cannot fly.&quot;)\n    super().__init__(name)\n\n#Cat derives the property of animal and those type of animals #that cannot fly\nclass Cat(CannotFly,Animal):\n  def __init__(self):\n    print('I am a cat.');\n    super().__init__('Cat')\ncat = Cat()\n<\/pre><\/div>\n\n\n<pre class=\"wp-block-preformatted\">Output\nI am a cat.\nCat cannot fly.\nCat is an animal.\nMethod Resolution Order\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-method-resolution-order\"><span class=\"ez-toc-section\" id=\"Method_Resolution_Order\"><\/span>Method Resolution Order<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Method Resolution Order or MRO helps Python find out the order in which the execution of inherited methods will occur. It is super handy when we are using super() because the MRO tells Python exactly where to look for a method we call with super() and in what order. We can use the __<strong>mro__<\/strong> attribute for this purpose.<\/p>\n\n\n\n<p>Let\u2019s look at the same example from the previous section.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nclass Animal: \n  def __init__(self, name):\n    print(name, 'is an animal.')\n\nclass CannotFly(Animal):\n  def __init__(self,name):\n    print(name, &quot;cannot fly.&quot;)\n    super().__init__(name)\n\n#Cat derives the property of animal and those type of animals #that cannot fly\nclass Cat(CannotFly,Animal):\n  def __init__(self):\n    print('I am a cat.');\n    super().__init__('Cat')\ncat = Cat()\nprint(Cat.mro)\n<\/pre><\/div>\n\n\n<pre class=\"wp-block-preformatted\">Output-<br>(<strong>main<\/strong>.Cat, <strong>main<\/strong>.CannotFly, <strong>main<\/strong>.Animal, object)<\/pre>\n\n\n\n<p>It clearly shows that the first method inside Cat class will be called, then the method inside the CannotFly class will be called, and finally, the method inside Animal class will be called.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-vivid-red-color has-text-color\" id=\"h-must-read\"><span class=\"ez-toc-section\" id=\"Must_Read\"><\/span>Must Read<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"http:\/\/www.pythonpool.com\/python-lowercase\/\">How to Convert String to Lowercase in<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/www.pythonpool.com\/square-root-in-python\/\">How to Calculate Square Root<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/www.pythonpool.com\/python-user-input\/\">User Input | Input () Function | Keyboard Input<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/www.pythonpool.com\/python-book\/\">Best Book to Learn Python in 2020<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>From all that we have discussed until now, we must have understood how important <strong>python super()<\/strong> is to make a developer-friendly and user-friendly code. It makes it so easy to access the methods inside the superclass implicitly from the subclass.<\/p>\n\n\n\n<p>Try to run the programs on your side and let me know if you have any queries.<\/p>\n\n\n\n<p><strong><em>Happy Coding!<\/em><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We all have must use Inheritance at some point in time or at least have heard how useful it is any object-oriented programming language. It &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Introduction to Python Super With Examples\" class=\"read-more button\" href=\"https:\/\/www.pythonpool.com\/python-super\/#more-3456\" aria-label=\"More on Introduction to Python Super With Examples\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":3484,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[15],"tags":[1314,1320,1306,1304,1308,1307,1312,1310,1305,1315,1322,1317,1319,1313,1311,1323,1316,1321,1309,1318],"class_list":["post-3456","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-python-call-super-method","tag-python-class-super","tag-python-super","tag-python-super-class","tag-python-super-function","tag-python-super-init","tag-python-super-2","tag-super-ball-python","tag-super-dwarf-retic-python","tag-super-dwarf-reticulated-python","tag-super-dwarf-reticulated-python-for-sale","tag-super-in-python","tag-super-init-python","tag-super-lesser-ball-python","tag-super-mojave-ball-python","tag-super-spider-ball-python","tag-super-stripe-ball-python","tag-super-xname-ball-python","tag-super-python","tag-what-is-super-in-python","infinite-scroll-item"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.1 (Yoast SEO v25.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Introduction to Python Super With Examples - Python Pool<\/title>\n<meta name=\"description\" content=\"Python super is used to create a proxy or temporary object of the superclass in the subclass. It allows the subclass to access the methods of the superclass\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pythonpool.com\/python-super\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introduction to Python Super With Examples\" \/>\n<meta property=\"og:description\" content=\"We all have must use Inheritance at some point in time or at least have heard how useful it is any object-oriented programming language. It allows one\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pythonpool.com\/python-super\/\" \/>\n<meta property=\"og:site_name\" content=\"Python Pool\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-04T09:25:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-01T06:55:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/Capture-2.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"603\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ashwini Mandani\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@pythonpool\" \/>\n<meta name=\"twitter:site\" content=\"@pythonpool\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ashwini Mandani\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.pythonpool.com\/python-super\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-super\/\"},\"author\":{\"name\":\"Ashwini Mandani\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/8a75fb48eb1f3dc952df65a8c28ac056\"},\"headline\":\"Introduction to Python Super With Examples\",\"datePublished\":\"2020-07-04T09:25:49+00:00\",\"dateModified\":\"2024-01-01T06:55:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-super\/\"},\"wordCount\":622,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.pythonpool.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-super\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/Capture-2.jpg\",\"keywords\":[\"python call super method\",\"python class super\",\"python super\",\"python super class\",\"python super function\",\"python super init\",\"python super()\",\"super ball python\",\"super dwarf retic python\",\"super dwarf reticulated python\",\"super dwarf reticulated python for sale\",\"super in python\",\"super init python\",\"super lesser ball python\",\"super mojave ball python\",\"super spider ball python\",\"super stripe ball python\",\"super xname ball python\",\"super() python\",\"what is super in python\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.pythonpool.com\/python-super\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pythonpool.com\/python-super\/\",\"url\":\"https:\/\/www.pythonpool.com\/python-super\/\",\"name\":\"Introduction to Python Super With Examples - Python Pool\",\"isPartOf\":{\"@id\":\"https:\/\/www.pythonpool.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-super\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-super\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/Capture-2.jpg\",\"datePublished\":\"2020-07-04T09:25:49+00:00\",\"dateModified\":\"2024-01-01T06:55:04+00:00\",\"description\":\"Python super is used to create a proxy or temporary object of the superclass in the subclass. It allows the subclass to access the methods of the superclass\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-super\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pythonpool.com\/python-super\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/python-super\/#primaryimage\",\"url\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/Capture-2.jpg\",\"contentUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/Capture-2.jpg\",\"width\":1000,\"height\":603,\"caption\":\"Python Super\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pythonpool.com\/python-super\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pythonpool.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Introduction to Python Super With Examples\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pythonpool.com\/#website\",\"url\":\"https:\/\/www.pythonpool.com\/\",\"name\":\"Python Pool\",\"description\":\"Your One-Stop Python Learning Destination\",\"publisher\":{\"@id\":\"https:\/\/www.pythonpool.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pythonpool.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pythonpool.com\/#organization\",\"name\":\"Python Pool\",\"url\":\"https:\/\/www.pythonpool.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png\",\"contentUrl\":\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png\",\"width\":452,\"height\":185,\"caption\":\"Python Pool\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/pythonpool\",\"https:\/\/www.youtube.com\/c\/pythonpool\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/8a75fb48eb1f3dc952df65a8c28ac056\",\"name\":\"Ashwini Mandani\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f765ed1940ac0ae1d30ce4cb2f1452c1e83143b07354d25a42c1cd118980e269?s=96&d=wavatar&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f765ed1940ac0ae1d30ce4cb2f1452c1e83143b07354d25a42c1cd118980e269?s=96&d=wavatar&r=g\",\"caption\":\"Ashwini Mandani\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Introduction to Python Super With Examples - Python Pool","description":"Python super is used to create a proxy or temporary object of the superclass in the subclass. It allows the subclass to access the methods of the superclass","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pythonpool.com\/python-super\/","og_locale":"en_US","og_type":"article","og_title":"Introduction to Python Super With Examples","og_description":"We all have must use Inheritance at some point in time or at least have heard how useful it is any object-oriented programming language. It allows one","og_url":"https:\/\/www.pythonpool.com\/python-super\/","og_site_name":"Python Pool","article_published_time":"2020-07-04T09:25:49+00:00","article_modified_time":"2024-01-01T06:55:04+00:00","og_image":[{"width":1000,"height":603,"url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/Capture-2.jpg","type":"image\/jpeg"}],"author":"Ashwini Mandani","twitter_card":"summary_large_image","twitter_creator":"@pythonpool","twitter_site":"@pythonpool","twitter_misc":{"Written by":"Ashwini Mandani","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pythonpool.com\/python-super\/#article","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/python-super\/"},"author":{"name":"Ashwini Mandani","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/8a75fb48eb1f3dc952df65a8c28ac056"},"headline":"Introduction to Python Super With Examples","datePublished":"2020-07-04T09:25:49+00:00","dateModified":"2024-01-01T06:55:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pythonpool.com\/python-super\/"},"wordCount":622,"commentCount":0,"publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"image":{"@id":"https:\/\/www.pythonpool.com\/python-super\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/Capture-2.jpg","keywords":["python call super method","python class super","python super","python super class","python super function","python super init","python super()","super ball python","super dwarf retic python","super dwarf reticulated python","super dwarf reticulated python for sale","super in python","super init python","super lesser ball python","super mojave ball python","super spider ball python","super stripe ball python","super xname ball python","super() python","what is super in python"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pythonpool.com\/python-super\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pythonpool.com\/python-super\/","url":"https:\/\/www.pythonpool.com\/python-super\/","name":"Introduction to Python Super With Examples - Python Pool","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pythonpool.com\/python-super\/#primaryimage"},"image":{"@id":"https:\/\/www.pythonpool.com\/python-super\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/Capture-2.jpg","datePublished":"2020-07-04T09:25:49+00:00","dateModified":"2024-01-01T06:55:04+00:00","description":"Python super is used to create a proxy or temporary object of the superclass in the subclass. It allows the subclass to access the methods of the superclass","breadcrumb":{"@id":"https:\/\/www.pythonpool.com\/python-super\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pythonpool.com\/python-super\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/python-super\/#primaryimage","url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/Capture-2.jpg","contentUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/Capture-2.jpg","width":1000,"height":603,"caption":"Python Super"},{"@type":"BreadcrumbList","@id":"https:\/\/www.pythonpool.com\/python-super\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pythonpool.com\/"},{"@type":"ListItem","position":2,"name":"Introduction to Python Super With Examples"}]},{"@type":"WebSite","@id":"https:\/\/www.pythonpool.com\/#website","url":"https:\/\/www.pythonpool.com\/","name":"Python Pool","description":"Your One-Stop Python Learning Destination","publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pythonpool.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.pythonpool.com\/#organization","name":"Python Pool","url":"https:\/\/www.pythonpool.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/","url":"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png","contentUrl":"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png","width":452,"height":185,"caption":"Python Pool"},"image":{"@id":"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/pythonpool","https:\/\/www.youtube.com\/c\/pythonpool"]},{"@type":"Person","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/8a75fb48eb1f3dc952df65a8c28ac056","name":"Ashwini Mandani","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f765ed1940ac0ae1d30ce4cb2f1452c1e83143b07354d25a42c1cd118980e269?s=96&d=wavatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f765ed1940ac0ae1d30ce4cb2f1452c1e83143b07354d25a42c1cd118980e269?s=96&d=wavatar&r=g","caption":"Ashwini Mandani"}}]}},"_links":{"self":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/3456","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/comments?post=3456"}],"version-history":[{"count":6,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/3456\/revisions"}],"predecessor-version":[{"id":31460,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/3456\/revisions\/31460"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media\/3484"}],"wp:attachment":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media?parent=3456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/categories?post=3456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/tags?post=3456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}