News for hackers. Stuff that matters.
Re:Python language moratorium is accepted by viraptor on Monday November 09, 2009 @02:28PM (#931561)
Just curious... Isn't there an easier way to handle this case "from the other side"? I.e. a way to write a class that will behave like a "stacking" generator - if the original generator g1 yields a generator g2, then the control will be given to g2 and g1 is put on the stack until g2 is finished - then pops g1 back. It would be a bit uglier and would require the control code to know about the problem (for x in StackingGen(g1()), instead of for x in g1()) and would remove the posibility to yield generators themselves, but it should work ;) Or are there some other problems with this idea?
Re:Python language moratorium is accepted by jamwt on Monday November 09, 2009 @04:36PM (#931798)
Yeah, diesel (http://dieselweb.org) takes this approach.