-
Book Overview & Buying
-
Table Of Contents
Python Object-Oriented Programming - Fifth Edition
By :
All the examples in the book use type hints. It’s time to make sure your projects are also using type hints. First, make sure you have a hint-checking tool installed.
Since hints can be added gradually, it makes sense to put them in a little at a time. After putting some hints in one of your exercises, be sure to run the hint-checking tool and see what error messages you get.
For an example application, refer to Chapter 1. The “Reading a big script” section shows a script that does a lot of processing. Some examples in this chapter show a way to describe some of the JSON documents that are processed by this application.
It can help to extend the examples in this chapter that describe the rest of the JSON document. Once the JSON document structure has been defined fully, the Pydantic class definitions can import the raw JSON text directly to Python objects.