Removing inheritance (decorator pattern ?)
Gerard flanagan
grflanagan at gmail.com
Tue Jun 17 03:48:52 EDT 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 gmail.com> 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' :-)
Non-canonically,
G.
More information about the Python-list
mailing list