July 2021
Beginner to intermediate
714 pages
17h 55m
English
In our examples so far, we've already seen many of the built-in Python data structures in action. You've probably also covered many of them in introductory books or tutorials. In this chapter, we'll discuss the object-oriented features of these data structures, when they should be used instead of a regular class, and when they should not be used. In particular, we'll be covering the following topics:
This chapter's case study will revisit the data model for the k-nearest neighbors classifier. After looking at Python's sophisticated built-in data structure and class definitions, we can simplify some of the application class definitions. ...
Read now
Unlock full access