This book will introduce you to many advanced features of the Python programming language. The focus is on creating the highest quality Python programs possible. This requires exploring design alternatives and determining which design offers the best performance while still being a good fit for the problem that is being solved.
The majority of this book showcases a number of alternatives for a given design. Some will offer better performance, while some will appear simpler or be a better solution to the problem domain. It's essential to locate the best algorithms alongside optimal data structures in order to create the most value with the least computer processing. Time is money, and programs that save time will create more value for their users. Python makes a number of internal features directly available to our application programs. This means that our programs can be very tightly integrated with existing Python features. We can leverage numerous Python features by ensuring that our object-oriented designs (OODs) integrate well.
As we explore different algorithms and data structures, we'll discover different memory and performance alternatives. It's an important OOD skill to be able to work through alternate solutions in order to properly optimize the final application. One of the more important themes of this book is that there's no single best approach to any problem.
As many of the examples as possible have full type hints. A few of the examples rely on packages outside the standard library, where you'll find that type hints are either missing or are incomplete. The examples have to be processed with the mypy tool to confirm the types are used consistently.
As we move toward achieving mastery of object-oriented Python, we'll spend a great deal of time reading Python code from a variety of sources. We'll observe wide variability even within the Python standard library modules. Rather than presenting examples that are all perfectly consistent, we've opted for some inconsistency; the lack of consistency will help to read kinds of code, as seen in various open source projects encountered in the wild.