PEP 255: Simple Generators
David Eppstein
eppstein at ics.uci.edu
Fri Jun 29 00:45:49 EDT 2001
In article <mailman.993373609.20265.python-list at python.org>,
"Tim Peters" <tim.one at home.com> wrote:
> Tail-recursion is pretty much insane for that in Python, as
> processing list[0] then recursing on list[1:] turns a speedy task into a
> quadratic-time mess.
So, back to the topic of PEP255: am I the only one bothered by the fact
that the inorder example in the PEP is quadratic time, and that it seems
difficult to use simple generators to yield a tree's nodes in inorder in
linear time?
--
David Eppstein UC Irvine Dept. of Information & Computer Science
eppstein at ics.uci.edu http://www.ics.uci.edu/~eppstein/
More information about the Python-list
mailing list