From: Edward L. <ed...@gr...> - 2006-03-17 03:58:34
|
Which of the following is the preferred idiom for accessing the children of a docutils.nodes.Element node? (All 3 seem to work) >>> for child in node: ... >>> for child in node.children: ... >>> for child in node.get_children(): ... Similarly, which of the following is preferred for replacing the children? >>> node[:] = new_child_list >>> node.children = new_child_list >>> node.children[:] = new_child_list -Edward |