Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
dewmsolo439y@Nojil I disagree.... Calling super means that you want the parent implementation as well. In other words it lets you extend the parent's implementation. Do more while retaining the normal behavior without having to rewrite it.
-
You *can* refactor if you don't like calling super, and the method in the parent class is meant to be overridden. Have the parent method do its thing, and then call a do-nothing hook method. Subclass can override the hook method, without having to call super.
Related Rants
that feeling every time you have to override a parent function and call super in python
undefined
python