STL multimap

Aaron Watters aaron.watters at gmail.com
Tue May 6 11:03:13 EDT 2008


I'm having trouble following your discussion
and I suspect you might be a friend of Mark V Cheney.
But I will focus on this one point.

On May 5, 11:14 pm, castiro... at gmail.com wrote:
> If recursive generators are really useless (erect wall might not be),

I would like to have recursive generators --
for example to be able to traverse a tree
and yield the value at every node.  Right now
to do this you need to build a chain of generators
from each leaf to the root of the tree (or avoid
recursion by managing your own stack of nodes).
Every yield must "bubble up the tree".

With stackless Python you create the equivalent
of a "recursive generator" by using channels
-- and you can do a lot of other cool stuff with
channels too.  The "yield" (which doesn't even
require a special keyword ;) ) goes directly to
the other endpoint of the channel, with no bubbling.
It's too bad the Python that comes
installed on Macs doesn't support channels :(.

I know I didn't address your question or comments...
  -- Aaron Watters

====
http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=ifdef+stackless



More information about the Python-list mailing list