On 28/08/2010 09:21, Arnaud Delobelle wrote:
This flattens the list in the flatwalk method (which IMHO it should do given its name!):
Heh, I often name things ahead of my actual capacity to implement them!
el is child.flatwalk():
Ah, I see what you mean. I think 'is' is 'in', but I kind of get the idea.
This turns it into a generator method:
And thanks for the generator versions too. I shall hack them in and poke them with a stick.
Of course, for the above to work, "leaf" objects need a modified flatwalk method, e.g.:
Yes, My 'stubs' (leaves) do have such, but I will edit to use yield. Thanks a mill. \d -- http://mail.python.org/mailman/listinfo/python-list