I'm working with Group.walk_groups()
function and trying to understand the term "preorder" in this statement:"walks self top to bottom (preorder), iterating over child groups in alphanumerical order". (Source Ref: def _f_walk_groups(self):
in source for tables.group
This is what I have observed. The top level groups are returned in alphabetical order. Then, when Child groups are returned they are in reverse alphabetical order (from top to bottom). So when I have this structure:
This is the output order I get when I loop on :
I reviewed the source and discovered this is a result of the way the group stack is popped (w/ stack.pop() to pop the last element). Is there a reason stack.pop(0) is not used?