Skip to Content
Python 3 Object-Oriented Programming - Second Edition
book

Python 3 Object-Oriented Programming - Second Edition

by Dusty Phillips
August 2015
Beginner to intermediate
460 pages
11h 20m
English
Packt Publishing
Content preview from Python 3 Object-Oriented Programming - Second Edition

Inheritance

We discussed three types of relationships between objects: association, composition, and aggregation. However, we have not fully specified our chess set, and these tools don't seem to give us all the power we need. We discussed the possibility that a player might be a human or it might be a piece of software featuring artificial intelligence. It doesn't seem right to say that a player is associated with a human, or that the artificial intelligence implementation is part of the player object. What we really need is the ability to say that "Deep Blue is a player" or that "Gary Kasparov is a player".

The is a relationship is formed by inheritance. Inheritance is the most famous, well-known, and over-used relationship in object-oriented ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python 3 Object-Oriented Programming - Third Edition

Python 3 Object-Oriented Programming - Third Edition

Dusty Phillips

Publisher Resources

ISBN: 9781784398781Supplemental Content