Skip to Content
Effective Python: 90 Specific Ways to Write Better Python, 2nd Edition
book

Effective Python: 90 Specific Ways to Write Better Python, 2nd Edition

by Brett Slatkin
November 2019
Intermediate to advanced content levelIntermediate to advanced
480 pages
13h 56m
English
Addison-Wesley Professional
Content preview from Effective Python: 90 Specific Ways to Write Better Python, 2nd Edition

5. Classes and Interfaces

As an object-oriented programming language, Python supports a full range of features, such as inheritance, polymorphism, and encapsulation. Getting things done in Python often requires writing new classes and defining how they interact through their interfaces and hierarchies.

Python’s classes and inheritance make it easy to express a program’s intended behaviors with objects. They allow you to improve and expand functionality over time. They provide flexibility in an environment of changing requirements. Knowing how to use them well enables you to write maintainable code.

Item 37: Compose Classes Instead of Nesting Many Levels of Built-in Types

Python’s built-in dictionary type is wonderful for maintaining dynamic ...

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

Effective Python: 125 Specific Ways to Write Better Python, 3rd Edition

Effective Python: 125 Specific Ways to Write Better Python, 3rd Edition

Brett Slatkin
Python for Programmers

Python for Programmers

Paul Deitel, Harvey Deitel

Publisher Resources

ISBN: 9780134854717