diff options
author | Guido van Rossum <guido@python.org> | 2002-05-27 13:35:05 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-05-27 13:35:05 (GMT) |
commit | 24989727b97368506c85bb23a1adfdf698f9ed7e (patch) | |
tree | ab5caa13574157c10d5fc538982cf90b3fec9d05 /Tools | |
parent | 5d2af63cc36ca1141e1ec7412fc33866f3908408 (diff) | |
download | cpython-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.py | 2 |
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 |