talin ovijnacmorg guido van rossum wrote also yielding everything iterator def flatteniterables iterables yield l 3 4 5 6 none range7 10 flattenl 0 1 2 3 4 5 6 7 8 9 people think resending correct place thanks guido ive suggested something similar back httpmailpythonorgpipermailpythonlist2005october348485html one point working algorithmic solver mathematical equations using recursive generators backtracking search able yield entire generators worth output would simplified considerably also theres potential optimization generator yielding entire output another generator might possible cut middleman ultimate consumer values read innermost generator directly dont know feasible however said using generators implement backtracking search much nicer trying regular recursion callbacks even nicer would true coroutines take example solver mentioned basically unifier take two trees composed nested tuples recursively walks matching goes level may several possible ways match algorithm iterates possibilities invoking lowerlevel matchers possibility lowerlevel matcher may turn find several possible matches may find none meaning upperlevel possibility didnt pan algorithm gets leaf yields result caller algorithm receives essentially stream answers read many wishes since generators cant operate across multiple stack frames way construct algorithm submatcher yield answers parent yield syntax comes case equation solver answers consist possible variable bindings given inputs x 1 2 3 stream answers applying associative rule x 1 2 3 x 1 2 3 one final comment pep 342 promises new yield semantics used implement true coroutines dont see actually make work anyone actually done talin _______________________________________________ python3000 mailing list smsbmo9552pythonorg httpmailpythonorgmailmanlistinfopython3000 unsubscribe httpmailpythonorgmailmanoptionspython3000python300040tangomucom wed 06 aug 2008 021648 0700 python3000 using packing lists places