Код: Выделить всё
class A(ABC):
@abstractmethod
@property
def name(self):
raise NotImplementedException()
class B(A):
@property
def name(self):
return "B"
implements(B(), A) # Not a real method, what i'd like to exist
Код: Выделить всё
Class C:
@property
def name(self):
return "C"
implements(C(), A) # Not a real method, what i'd like to exist
Подробнее здесь: https://stackoverflow.com/questions/629 ... -interface
Мобильная версия