summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-05-27 13:35:05 (GMT)
committerGuido van Rossum <guido@python.org>2002-05-27 13:35:05 (GMT)
commit24989727b97368506c85bb23a1adfdf698f9ed7e (patch)
treeab5caa13574157c10d5fc538982cf90b3fec9d05 /Tools
parent5d2af63cc36ca1141e1ec7412fc33866f3908408 (diff)
downloadcpython-24989727b97368506c85bb23a1adfdf698f9ed7e.zip
cpython-24989727b97368506c85bb23a1adfdf698f9ed7e.tar.gz
cpython-24989727b97368506c85bb23a1adfdf698f9ed7e.tar.bz2
Use self.__class__ to instantiate a TreeNode item recursively, to
allow subclassing.
Diffstat (limited to 'Tools')
-rw-r--r--Tools/idle/TreeWidget.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/idle/TreeWidget.py b/Tools/idle/TreeWidget.py
index be80a63..37bc58f 100644
--- a/Tools/idle/TreeWidget.py
+++ b/Tools/idle/TreeWidget.py
@@ -187,7 +187,7 @@ class TreeNode:
# _IsExpandable() was mistaken; that's allowed
return y+17
for item in sublist:
- child = TreeNode(self.canvas, self, item)
+ child = self.__class__(self.canvas, self, item)
self.children.append(child)
cx = x+20
cy = y+17