I have a base class with a property which (the get method) I want to overwrite in the subclass. My first thought was something like:
class Foo(object):
d
class Foo:
# Template method
@property
def age(self):
return self.dothis()
# Hook method of TM is accessor method of property at here
def dothis(self):
return 11
class Bar(Foo):
def dothis(self):
return 44
Same as Nizam Mohamed, just to mention that style guide 2.13.4 using both template method and property