🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

Python Beginner

What is Class?

A blueprint for creating objects that bundles data (attributes) and behavior (methods) together.

Classes are the foundation of object-oriented programming in Python. They define attributes (data) and methods (functions) that objects of that class will have. The __init__ method initializes new instances.

Python supports inheritance (single and multiple), encapsulation (via naming conventions), and polymorphism. Special methods (dunder methods like __str__, __repr__, __eq__) customize object behavior.

Related Terms

Python Descriptors
Objects that define __get__, __set__, or __delete__ methods, controlling how attribute access works on other objects.
Python ABC Module
The Abstract Base Classes module that enables defining interfaces and abstract methods that subclasses must implement.
Comprehension
A concise syntax pattern for creating collections by transforming and filtering items from iterables.
FastAPI
A modern, high-performance Python web framework for building APIs with automatic OpenAPI documentation and type validation.
Enum
A built-in class for creating enumerated constants — named groups of related values that improve code readability.
Python Profiling
Measuring where Python code spends time and memory to identify performance bottlenecks and optimization opportunities.
View All Python Terms →