On Mon, Jul 16, 2007 at 06:13:35PM -0400, Kent Johnson wrote:
Kent -
Rather than try to reply in detail to your suggestions, I've tried
to ammend my document to reflect your comments.
Thanks again for the help.
Dave
[good suggestions and corrections from Kent, snipped]
--
Dave Kuhlman
John Fouhy wrote:
def walkTree(tree):
# stack to hold nodes as we walk through
stack = []
stack.append(tree)
while stack:
value, children = stack.pop()
for child in reversed(children): # reverse children to get
the right order.
Dave Kuhlman wrote:
On Fri, Jul 13, 2007 at 12:39:40PM +1200, John Fouhy wrote:
On 13/07/07, Dave Kuhlman [EMAIL PROTECTED] wrote:
And, I have a question -- If you look at the example of the
iterative (non-recursive) generator (the Doubler class), you will
see that it walks a list, not a
Dave Kuhlman wrote:
I find iterators and generators fascinating. So, in order to try
to understand them better myself, I've written up some notes. I'm
hoping that these notes might help someone new to the generators
and iterators in Python. You can find it here:
Dave Kuhlman wrote:
I find iterators and generators fascinating. So, in order to try
to understand them better myself, I've written up some notes. I'm
hoping that these notes might help someone new to the generators
and iterators in Python. You can find it here:
On Fri, Jul 13, 2007 at 12:39:40PM +1200, John Fouhy wrote:
On 13/07/07, Dave Kuhlman [EMAIL PROTECTED] wrote:
And, I have a question -- If you look at the example of the
iterative (non-recursive) generator (the Doubler class), you will
see that it walks a list, not a tree. That's because
I find iterators and generators fascinating. So, in order to try
to understand them better myself, I've written up some notes. I'm
hoping that these notes might help someone new to the generators
and iterators in Python. You can find it here:
On 13/07/07, Dave Kuhlman [EMAIL PROTECTED] wrote:
And, I have a question -- If you look at the example of the
iterative (non-recursive) generator (the Doubler class), you will
see that it walks a list, not a tree. That's because I was *not*
able to figure out how to implement a non-recursive