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

Summary

This chapter discussed several common design patterns in detail, with examples, UML diagrams, and a discussion of the differences between Python and statically typed object-oriented languages. The decorator pattern is often implemented using Python's more generic decorator syntax. The observer pattern is a useful way to decouple events from actions taken on those events. The strategy pattern allows different algorithms to be chosen to accomplish the same task. The state pattern looks similar, but is used instead to represent systems can move between different states using well-defined actions. The singleton pattern, popular in some statically typed languages, is almost always an anti-pattern in Python.

In the next chapter, we'll wrap up ...

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