Skip to content
masterclass Buddy

Python · Module

abc

Python's abc module lets you define abstract base classes. They describe required methods and stop incomplete subclasses from being instantiated.

Last updated

Since
3.4

Syntax

class MyABC(ABC):
    @abstractmethod
    def method(self):
        ...

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • ABCMeta
  • abstractmethod
  • register()
  • __subclasshook__()
  • update_abstractmethods()
  • collections.abc
  • Iterable
  • Sequence

Source: abc — Abstract Base Classes — Python 3.15.2 documentation. Checked 2026-11-03.