Код: Выделить всё
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 )
Возможно ли это?
"Логической" причиной этого является то, что я не хочу, чтобы пользователи вызывали методы в неправильном порядке.>
Подробнее здесь: https://stackoverflow.com/questions/451 ... n-subclass