Abstracting algorithms (graph depth first search)

Paul Moore gustav at morpheus.demon.co.uk
Sat May 10 18:00:26 EDT 2003


Scott David Daniels <scott.daniels at acm.org> writes:

> I'd say that preorder and postorder are distinct, and provide both
> as iterators, leaving the user to figure out what to do per element.

That looks quite reasonable, but the duplication feels irritating. And
I have a suspicion that iterators may not give enough access to the
key "events" in the iteration...

I need more real-life use cases :-)

Thanks for the help,
Paul
-- 
This signature intentionally left blank




More information about the Python-list mailing list