How to make an Abstract Class inherit from another Abstract Class in Python?

Have a look at abc module. For 2.7: link. For 3.6: link
Simple example for you:

from abc import ABC, abstractmethod

class A(ABC):
    def __init__(self, value):
        self.value = value
        super().__init__()

    @abstractmethod
    def do_something(self):
        pass


class B(A):
    @abstractmethod
    def do_something_else(self):
        pass

class C(B):
    def do_something(self):
        pass

    def do_something_else(self):
        pass

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)