I came across a bug in my code where an overriding method was hidden because I’d forgotten the @classmethod decorator. I was wandering if it’s possible to force the other way (noted it’s probably bad design) but something like:
class Super:
@classmethod
def do_something(cls):
...
class Child:
def do_something(self):
...
obj = Child()
obj.do_something() #calls the child
Child.do_something() #calls the Super method
EDIT: No specific case at the moment but I was wandering if it could hypothetically be done.
As a pure hypothetically application, this could be one way:
Example: