title: When should behaviour that is to be customized in subclasses be put in seperate methods?
body: <p>consider (python):</p>
  
  <p>assume global functions: <code>default_start()</code>, <code>main_behaviour()</code>, <code>default_end()</code>, <code>custom_start()</code>, and <code>custom_end()</code> just as code filler for illustration purposes.</p>
  
  <pre><code>class Parent:
      def on_start_main(self):
          default_start()
  
      def main_behaviour(self):
          main_behaviour()
  
      def on_end_main(self):
          default_end()
  
      def main(self):
          self.on_start_main()
          self.main_behaviour()
          self.on_end_main()
  
  class Child(Parent):
      def on_start_main(self):
          custom_start()
  
      def on_end_main(self):
          custom_end()
  </code></pre>
  
  <p>vs</p>
  
  <pre><code>class Parent:
      def main_behaviour(self):
          main_behaviour()
  
      def main(self):
          default_start()
          self.main_behaviour()
          default_end()
  
  class Child(Parent):
      def main(self):
          custom_start()
          Parent.main_behaviour(self)
          custom_end()
  </code></pre>
  
  <p>I don't know which of these is preferable, but I suspect the second. Is this a matter of taste or are there concrete reasons why one is better than the other?</p>
  
  <p>Thanks</p>