[Idle-dev] Code comment

Guido van Rossum guido@python.org
Mon, 27 May 2002 09:41:10 -0400


>   In the codes obtaining from 0.8.1, TreeWidget.py, line 190,
> 
> child = TreeNode(self.canvas, self, item)
> 
>   Could it be changed to:
> 
> child = self.__class__(self.canvas, self, item)
> 
>   I think out of this change because when I want to derive from class
> TreeNode, I need to override the draw() method in my derived class as
> well.

Good idea!  I've applied this to the Python branch of IDLE; someone
else please apply to to IDLEFORK.

--Guido van Rossum (home page: http://www.python.org/~guido/)