
Feb. 19, 2009
2:36 p.m.
Antoine Pitrou wrote:
It should be relatively easy to avoid O(n**2) behaviour when traversing a tree,
How?
The problem I have with allowing "return" in generators is that it makes things much more confusing (try explaining a beginner that he has the right to return a value from a generator but the value can't be retrieved through any conventional means
I don't think it will be any harder than explaining why they get a syntax error if they try to return something from a generator at present. -- Greg