Best Sellers Rank: #454,227 in Books (See Top 100 in Books) #19 in Object-Oriented Software Design #155 in Object-Oriented Design #423 in Python Programming
Customer Reviews: 4.3 out of 5 stars 108Reviews
Product Information
From the Publisher
What’s new in this fourth edition of Python Object-Oriented Programming?
Topics Covered:
Object-Oriented Design
When to Use OOP
Abstract Classes and Operator Overloading
Python Data Structures
The Intersection of OOP and Functional Programming
Strings, Serialization, and File Paths
The Iterator Pattern
...and more!
This fourth edition builds upon classes, data encapsulation, and exceptions with an emphasis on when you can use each principle to develop well-designed software. You’ll learn how to tackle a project using OOP from all its different perspectives and see how a design evolves over time.
What’s New:
Updated for Python 3.9+
Expanded to cover abstract base classes and operator overloading
Updated to cover latest asyncio features in the concurrency chapter
Introduction to new automated testing systems, unit tests, and pytest
How does this book help readers learn about Python Object-Oriented Programming?
Python Object-Oriented Programming, 4th Edition takes you through the fundamentals of object-oriented programming principles and how to effectively implement them in Python, providing clear, intuitive explanations supplemented with useful example code throughout.
This book also shows you how to use Python's built-in exceptions and data structures, as well as elements of the Python standard library. It also demonstrates how to use various concurrency libraries available as part of Python; this lets you write software that can make use of multiple cores and multiple processors in a modern computer.
We’ve illustrated as many object-oriented programming techniques and situations as possible to provide clear guidance for developers who are trying to expand Python skills. The main goal is to work from foundational object-oriented design concepts through to more sophisticated applications of those concepts.
What makes this book different from other Python OOP books?
Each chapter discusses a case study, which can be solved using a variety of techniques that are unique to that chapter. The idea of a consistent case study with multiple solutions is a valuable part of the book. It’s very important – especially for programmers new to object-oriented design – to see multiple solutions to a problem.
We also feel unit testing is an essential ingredient that’s often omitted from a lot of writing about programming and programming languages. The entire book’s set of examples has a complete unit test suite. This even includes running the mypy tool in strict mode on all the code. In addition to talking about testing in the book, the code repository associated with the book has all the example doctests and the code unit tests for all the examples.
Additionally, we worry about an over-emphasis on object-oriented design and programming. We’ve included a chapter on functional programming techniques because these are part of Python and shouldn’t be shunned through a - possibly - mistaken bias toward class definitions.
Finally, we’ve fully embraced type annotations. We revised all the examples to make use of type hints.
Key Features:
In-depth analysis of common object-oriented design patterns that are suitable to Python's style
Work with data (JSON serialization, validation, and more)
Catch exceptions, explore authentication, add tests and concurrency, and implement ML algorithms
Case studies are part of one large ML project (building a k-NN classifier to classify a species)