Skip to Content
Object-Oriented Python
book

Object-Oriented Python

by Irv Kalb
January 2022
Beginner to intermediate
416 pages
10h 21m
English
No Starch Press
Content preview from Object-Oriented Python

9 Polymorphism

This chapter is about the second major tenet of OOP: polymorphism. Its component parts are from the Greek: the prefix poly means “much” or “many,” and morphism means “shape,” “form,” or “structure.”

So, polymorphism essentially means many forms. I’m not talking about a Star Trek–style shape-shifting alien—in fact, it’s quite the opposite. Rather than one thing taking on many shapes, polymorphism in OOP is about how multiple classes can have methods with the exact same names. This will eventually give us a highly intuitive way to act on a collection of objects, independent of what class each came from.

OOP programmers often ...

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 Object-Oriented Programming - Fourth Edition

Python Object-Oriented Programming - Fourth Edition

Steven F. Lott, Dusty Phillips
Python for Programmers

Python for Programmers

Paul Deitel, Harvey Deitel
Robust Python

Robust Python

Patrick Viafore

Publisher Resources

ISBN: 9781098129842Errata Page