On Sep 9, 8:44 am, Terry Brown <[email protected]> wrote: > I don't think p.self_and_subtree() advances p either, at least it > didn't appear to just now in a quick test.
Correct. I got confused. self_and_subtree does its own call to p.copy() for safety. > The OP's issue seemed to be wanting to access the first element of an > iterator after you've consumed the iterator The point I was trying to make, not very successfully, is that p.copy().anything is a way to use 'anything' without worrying that p could change. For example, you can safely pass p.copy().self_and_subtree as an argument. True, this isn't an exact answer to the original question, but it might be a more elegant solution to the actual problem... Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
