Is it possible to make a public method private in a subclass? I don't want other classes extending this one to be able to call some of the methods. Here is an example:
class A: def __init__(self): #do something here def method(self): #some code here class B(A): def __init__(self): A.__init__(self) #additional initialization goes here def method(self): #this overrides the method ( and possibly make it private here )
from this point forward, I don't want any class that extends from B to be able to call
Is this possible?
EDIT: a "logical" reason for this is that I don't want users to call methods in the wrong order.