Boolean value of generators

Grant Edwards invalid at invalid.invalid
Fri Oct 15 11:54:49 EDT 2010


On 2010-10-15, Albert Hopkins <marduk at letterboxes.org> wrote:
> 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!

Then I could write a generator that reports stock prices and...

-- 
Grant Edwards               grant.b.edwards        Yow! Zippy's brain cells
                                  at               are straining to bridge
                              gmail.com            synapses ...



More information about the Python-list mailing list