mirror of
https://github.com/python/cpython.git
synced 2024-11-23 18:04:37 +08:00
Use self.__class__ to instantiate a TreeNode item recursively, to
allow subclassing.
This commit is contained in:
parent
5d2af63cc3
commit
24989727b9
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user