Simulation with Classes and Inheritance

In the previous chapters, we described the entities we derived from libraries as objects with no further explanation. For example, an entity describing a web page in our previous chapter was an object with its own values and methods—bound functions that seem to have access to objects internals.

In fact, we can create our own structures by defining classes. In this chapter, we'll do exactly that—learn how to define and make the most of classes and their properties. Along the way, we will use classes to create a rather complex system and monitor its behavior—something that classes are very good for. Because of that, classes are used extensively in games, computer graphics...in fact, any type of task where ...

Get Learn Python by Building Data Science Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.