PEP 255: Simple Generators

David Eppstein eppstein at
Fri Jun 29 00:45:49 EDT 2001

In article <mailman.993373609.20265.python-list at>,
 "Tim Peters" < at> 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

More information about the Python-list mailing list