This question already has an answer here:
I'm trying to understand the use of super(). From the looks of it, both child classes can be created, just fine.
I'm curious to know about the actual difference between the following 2 child classes.
print "Base created"
super() lets you avoid referring to the base class explicitly, which can be nice. But the main advantage comes with multiple inheritance, where all sorts of fun stuff can happen. See the standard docs on super if you haven't already.
Note that the syntax changed in Python 3.0: you can just say super().__init__() instead of super(ChildB, self).__init__() which IMO is quite a bit nicer. The standard docs also refer to a guide to using super() which is quite explanatory.
Technology & Software
Bugs & Fixes
C Plus Plus Interview
Class 10 Science
Linear Integrated Circuits Interview
Nursing And Midwifery
Social Media Marketing
Graphics & Design
Accounts & Finance
Design & Animation
Architecture, Interior Design
NGO , Social Services , Regulators, Industry Associations
Marine Deck Department
Travel , Hotels , Restaurants , Airlines, Railways
Office Equipment , Automation
Media , Entertainment , Internet
Fertilizers , Pesticides
Pharma , Biotech , Clinical Research
Banking , Financial Services , Broking
Reviews Category Comming soon..
Search Engine Marketing
Marketing Category Comming soon..
Offers Category Comming soon..
Is It Possible To Live-stream Video From Windows Azure
Internet of Things
Trust Store Vs Key Store - Creating With Keytool
How To Check If Array Is Not Empty? [duplicate]
Can An Mqtt Broker Be Configured Not To Echo Messages On A Topic?