In a Python 2 new-style class declared as Child(Base), what is the correct way for a method foo() to call its base implementation?
Python 2 new-style classes allow to call base classes methods without specifying parent's class name, ie
by utilizing a super() method:
super(Child, self).foo()

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Python quizzes
Sign Up Now
or Subscribe for future quizzes