Why generators take long time?

Jason Swails jason.swails at gmail.com
Tue Jan 19 15:25:44 EST 2016


On Tue, Jan 19, 2016 at 3:19 PM, Jason Swails <jason.swails at gmail.com>
wrote:

>
> I use generator expressions when
>
> - I *might* want to
>

​I forgot to finish my thought here.  I use generator expressions when I
don't want to worry about memory, there's a decent chance of
short-circuiting​, or I just want to do some simple iteration where the
iterator will not be the bottleneck (which is almost always).

-- 
Jason M. Swails
BioMaPS,
Rutgers University
Postdoctoral Researcher



More information about the Python-list mailing list