Removing inheritance (decorator pattern ?)

Gerard flanagan grflanagan at
Tue Jun 17 09:48:52 CEST 2008

Maric Michaud wrote:
> Le Monday 16 June 2008 20:35:22 George Sakkis, vous avez écrit :
>> On Jun 16, 1:49 pm, Gerard flanagan <grflana... at> wrote:
>>> variation of your toy code. I was thinking the Strategy pattern,
>>> different classes have different initialisation strategies? But then you
>>> could end up with as many Strategy classes as subclasses, I don't know.
>> This doesn't solve the original problem, the combinatorial explosion
>> of empty subclasses.
> Yes, and it fails to implement the strategy pattern as well... which would 
> have solved the problem as it is intended exactly for this purpose.

Ok, better would have been 'my made-up strategy pattern, any resemblance 
to other patterns, either living or dead, is purely coincidental' :-)



More information about the Python-list mailing list