Tree views - Best design practices

Jonathan Gardner jgardner at jonathangardner.net
Thu Jan 8 17:41:56 EST 2009


On Jan 8, 1:50 pm, "Filip Gruszczyński" <grusz... at gmail.com> wrote:
>
> But I am looking for a different type of flexibility. I would like to
> be able to add more classes to my hierarchy and not have to change my
> code in many places when I add new class to the hierarchy. If I have
> to change every class in the hierarchy because I add new class, then
> it's not something I would like to do. And idea how I can avoid this?
>

I don't understand why you have to change other classes when you add a
new class under duck typing. The whole point of duck typing is you
don't look at the class or the interface of an object so you don't
have to keep track of it.



More information about the Python-list mailing list