I have an "abstract" class, such as:
class A:
def do_some_cool_stuff():
''' To override '''
pass
def do_some_boring_stuff():
return 2 + 2
And class B, subclassing A:
class B(A):
def do_stuff()
return 4
Is there any way to declare, that a method A.do_some_cool_stuff must be overriden, and, possibly that some warning should be raised while trying to create B-class object, when B had not implemented A.do_some_cool_stuff?
raise NotImplementedError("Subclass responsibility")approach which I was about to suggest here.