O'Reilly logo

Learning Python Design Patterns by Gennadiy Zlobin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

The Template Method is a design pattern that defines the basis of an algorithm and enables successors to redefine some steps of the algorithm without changing its structure. The Template Method pattern allows good extensibility of the algorithm, but only where permitted. This design pattern is well applied when you have an algorithm whose behavior is common but the implementation may vary and you have some steps that need to be adapted to different contexts.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required