To get the most out of this book
All of the examples were tested with Python 3.9.5. The mypy tool, version 0.812, 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.
Download the example code files
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Python-Object-Oriented-Programming---4th-edition.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Download the color images
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781801077262_ColorImages.pdf
Conventions used
There are a number of text conventions used throughout this book.
CodeInText
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. For example: "You can confirm Python is running by importing the antigravity
module at the >>>
prompt."
A block of code is set as follows:
class Fizz:
def member(self, v: int) -> bool:
return v % 5 == 0
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
class Fizz:
def member(self, v: int) -> bool:
return v % 5 == 0
Any command-line input or output is written as follows:
python -m pip install tox
Bold: Indicates a new term, an important word, or words that you see on the screen, for example, in menus or dialog boxes. For example: "Formally, an object is a collection of data and associated behaviors."
Warnings or important notes appear like this.
Tips and tricks appear like this.