All pastes #2053633 Raw Edit

Mine

public text v1 · immutable
#2053633 ·published 2011-05-03 22:34 UTC
rendered paste body
Imagine that you have the follow classes:

class Download():
  def download(self):
     print 'foo'

class Installer():
  def _fetch(self):
     print 'foo'


Both methods have the same implementation.
What is the better way in python to avoid code duplication in this case?

NOTE: You can not change the methods name in both classes.