< Out Of Order
Hey Hey Hey >

Python Generators: I'm messing around with Python generators for the first time, because I figured they'd make it easy to write different ways of traversing a Beautiful Soup parse tree, a la Ka-Ping Yee's scraper script. And they do make it easy, but they also slow down recursive tree traversals quite a bit. Is there a fast way to do this, or should I just unroll the recursion so I'm not creating a million generators?

Filed under:


[Main] [Edit]

Unless otherwise noted, all content licensed by Leonard Richardson
under a Creative Commons License.