# Abstract Base Class (abc)

say it: **“AB-strakt BAYS klas”** **/ˈæbstrækt beɪs klæs/** or **“AY-BEE-SEE”** **/ˌeɪˌbiˈsi/**

A class you cannot use directly; it lists methods every child must write.

## What is an **abstract base class**?

An **abstract base class** is a class you can't use directly. It lists methods that every child class must write, so they all share the same shape.

```python
from abc import ABC, abstractmethod

class Shipping(ABC):
    @abstractmethod
    def cost(self, weight): ...

class Ground(Shipping):
    def cost(self, weight):
        return 5 + weight

print(Ground().cost(3))  # 8
```

Level: Freelancer · [More Python terms at this level](https://www.ask-codey.com/glossary?category=python&level=4)

Updated: November 17, 2026

Source: https://www.ask-codey.com/glossary/abstract-base-class-abc
