James Harris wrote:
I don't know yet whether it will be
easier to modify the tree or to create a new one for each phase.
You can create a new tree using this style as
well. Just have each method create and return a
new node instead of modifying the existing one.
--
Greg
--
On 18 Aug, 21:50, Chris Rebert c...@rebertia.com wrote:
On Tue, Aug 18, 2009 at 10:09 AM, James
Harrisjames.harri...@googlemail.com wrote:
I am writing some code to form a tree of nodes of different types. The
idea is to define one class per node type such as
class node_type_1(node):
James Harris a écrit :
On 18 Aug, 21:50, Chris Rebert c...@rebertia.com wrote:
(snip)
class node_type_1:
def walk_tree(self):
#code
self.subtree.walk()
class node_type_2:
def walk_tree(self):
#code
self.subtree.walk()
#etc
Interesting idea.
Basic
I am writing some code to form a tree of nodes of different types. The
idea is to define one class per node type such as
class node_type_1(node):
specific properties by name including other node types
class node_type_2(node):
specific properties by name including other node types
etc
(Class
James Harris wrote:
I am writing some code to form a tree of nodes of different types. The
idea is to define one class per node type such as
class node_type_1(node):
specific properties by name including other node types
class node_type_2(node):
specific properties by name including other
On Aug 18, 2:09 pm, James Harris james.harri...@googlemail.com
wrote:
I am writing some code to form a tree of nodes of different types. The
idea is to define one class per node type such as
class node_type_1(node):
specific properties by name including other node types
class
On Tue, Aug 18, 2009 at 10:09 AM, James
Harrisjames.harri...@googlemail.com wrote:
I am writing some code to form a tree of nodes of different types. The
idea is to define one class per node type such as
class node_type_1(node):
specific properties by name including other node types
class