Python ABC Multiple Inheritance

The issue is with inheriting from a dict, which is probably better explained by these guys:

  • https://treyhunner.com/2019/04/why-you-shouldnt-inherit-from-list-and-dict-in-python/
  • http://www.kr41.net/2016/03-23-dont_inherit_python_builtin_dict_type.html

So depending on little what you want to do with your subclassed dict you could go with MutableMapping as suggested in https://stackoverflow.com/a/3387975/14536215 or with UserDict (which is a subclass of MutableMapping) such as:

from abc import ABC, abstractmethod
from collections import UserDict


class BaseABC(ABC):

    @abstractmethod
    def hello(self):
        pass

class Child(BaseABC, UserDict):
    pass


child = Child()