Template method design pattern in python.

by , under python

Here is an example of implementing template method in python. This example assumes that ONLY meat in the burrito varies and so the child class implements the template method of selecting the meat while rest of the work is done by the base class…

Gist: https://gist.github.com/rajaramanathan/0a6b9e4bc98d022cf2da

  1. djon

    Your example could be more striking with the use of function templated. __heatTortilla could call a different function defined in the implementation class.


Leave a Reply