On 31.01.2017 08:13, Roberto Martínez wrote:
class MyOverridedClass(MyBaseClass):def mymethod(self, foo, **kwargs):# Do somethingreturn super().mymethod(**kwargs)
What about creating a decorator to call super() after/before the overrided method? Something like that:
class MyOverridedClass(MyBaseClass):@extendsuperdef mymethod(self, foo):# Do somethingI could find this useful. There's just on bikeshedding issue:
When should "super().mymethod(**kwargs)" be called: before, after or inbetween my specialized code?
Depending on the baseclass either of those three is necessary. As far as I can tell, we encounter all of them regularly.