# Python-Object-Oriented-Programming-5E
**Repository Path**: rangliuqingqing/Python-Object-Oriented-Programming-5E
## Basic Information
- **Project Name**: Python-Object-Oriented-Programming-5E
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2026-02-04
- **Last Updated**: 2026-02-04
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
Python Object-Oriented Programming, Fifth Edition
This is the code repository for Python Object-Oriented Programming, Fifth Edition, published by Packt.
Learn how and when to apply OOP principles to build scalable and maintainable Python applications
Steven F. Lott, Dusty Phillips
About the book
Learn to write effective, maintainable, and scalable Python applications by mastering object-oriented programming with this updated fifth edition. Whether you’re transitioning from scripting to structured development or refining your OOP skills, this book offers a clear, practical path forward.
You’ll explore Python’s approach to OOP, from class creation and inheritance to polymorphism and abstraction, while discovering how to make smarter decisions about when and how to use these tools. You’ll apply what you learn through hands-on examples and exercises.
Updated for Python 3.13, this edition simplifies complex topics such as abstract base classes, testing with unittest and pytest, and async programming with asyncio. It introduces a new chapter on Python’s type hinting ecosystem—crucial for modern Python development.
Written by long-time Python experts Steven Lott and Dusty Phillips, this edition emphasizes clarity, testability, and professional software engineering practices. It helps you move beyond scripting to building well-structured, production-ready Python systems.
By the end of this book, you’ll be confident in applying OOP principles, design patterns, type hints, and concurrency tools to create robust and maintainable Python applications.
Key Learnings
- Write Python classes and implement object behaviors
- Apply inheritance, polymorphism, and composition
- Understand when to use OOP—and when not to
- Use type hints and perform static and runtime checks
- Explore common and advanced design patterns in Python
- Write unit and integration tests with unittest and pytest
- Implement concurrency with asyncio, futures, and threads
- Refactor procedural code into well-designed OOP structures
Chapters
- Object-Oriented Design
- Objects in Python
- When Objects Are Alike
- Expecting the Unexpected
- When to Use Object-Oriented Programming
- Abstract Base Classes and Operator Overloading
- Python Type Hints
- Python Data Structures
- The Intersection of Object-Oriented and Functional Programming
- The Iterator Pattern
- Common Design Patterns
- Advanced Design Patterns
- Testing Object-Oriented Programs
- Concurrency
Requirements for this book
- All the examples were tested with Python 3.12.5. The pyright tool, version 1.1, was used to confirm
that the type hints were consistent.
- Some of the examples depend on an internet connection to gather data. These interactions with
websites generally involve small downloads.
- Some of the examples involve packages that are not part of Python’s built-in standard library. In
the relevant chapters, we note the packages and provide the install instructions. All of these extra
packages are in the Python Package Index, at https://pypi.org.
Get to know Authors
_Steven F. Lott_ Steven Lott has been programming since computers were large, expensive, and rare. Working for decades in high tech has given him exposure to a lot of ideas and techniques, some bad, but most are helpful to others. Since the 1990s, Steven has been engaged with Python, crafting an array of indispensable tools and applications. His profound expertise has led him to contribute significantly to Packt Publishing, penning notable titles like "Mastering Object-Oriented," "The Modern Python Cookbook," and "Functional Python Programming." A self-proclaimed technomad, Steven's unconventional lifestyle sees him travelling back and forth across the US. He tries to live by the words “Don't come home until you have a story.”
_Dusty Phillips_ Dusty Phillips is a Canadian software developer known for authoring several popular programming books.
Other Related Books
Testing the code base
This was tested using **uv**.
See https://docs.astral.sh/uv/ for how to install **uv**.
Each chapter is a separate mini-project.
Most a scripts, a few are libraries.
Generally, it's possible to use terminal commands like the following to confirm the chapter's code works:
```bash
cd ch_1
uvx tox run
```
This will install a copy of ``tox`` and run it to confirm the various virtual environments work.
The project structure
Each chapter's code is in a separate directory, `ch_01`, `ch_02`, etc.
Within the chapter, there's some combination of `src`, and `tests` folders.
There will also be a `pyproject.toml` file with parameters used to control tools
like **tox**.
Download a free PDF
If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.
https://packt.link/free-ebook/9781836642596