AI engineering glossary · Python advanced

What is abc module?

abc module: A standard library module that supplies the tools for defining abstract base classes, including the ABC helper class and the @abstractmethod decorator. Instantiating a class with unimplemented abstract methods raises TypeError.

Level: advancedTopic: Python advanced

abc module: an example

from abc import ABC, abstractmethod; then mark predict with @abstractmethod so subclasses must define it.

Related terms

More Python advanced terms

Where you learn it

abc module is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.