Boolean value of generators

Albert Hopkins marduk at letterboxes.org
Fri Oct 15 11:20:59 EDT 2010


On Fri, 2010-10-15 at 14:54 +0000, Grant Edwards wrote:
> > so you could test for emptiness, look ahead at the next item without
> > consuming it, etc.
> 
> And what happens when the generator is doing things like executing
> database transactions? 

You should also add prediction to the caching.  This will improve
performance even more!

-a




More information about the Python-list mailing list