Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #101907

Re: Why generators take long time?

From Jason Swails <jason.swails@gmail.com>
Newsgroups comp.lang.python
Subject Re: Why generators take long time?
Date 2016-01-19 15:25 -0500
Message-ID <mailman.112.1453235154.15297.python-list@python.org> (permalink)
References <1e092318-5052-4383-aabe-dd979d72645d@googlegroups.com> <CAEk9e3oy+Nx7JPKiHqujOWvNGmM8Jdw2SBv3PHAt6iS=zWqXjg@mail.gmail.com>

Show all headers | View raw


On Tue, Jan 19, 2016 at 3:19 PM, Jason Swails <jason.swails@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

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Why generators take long time? Arshpreet Singh <arsh840@gmail.com> - 2016-01-18 23:27 -0800
  Re: Why generators take long time? Arshpreet Singh <arsh840@gmail.com> - 2016-01-19 00:06 -0800
  Re: Why generators take long time? Steven D'Aprano <steve@pearwood.info> - 2016-01-19 21:11 +1100
    Re: Why generators take long time? Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2016-01-19 10:24 +0000
      Re: Why generators take long time? Steven D'Aprano <steve@pearwood.info> - 2016-01-20 10:58 +1100
    Re: Why generators take long time? Arshpreet Singh <arsh840@gmail.com> - 2016-01-19 11:35 -0800
  Re: Why generators take long time? Jason Swails <jason.swails@gmail.com> - 2016-01-19 15:19 -0500
  Re: Why generators take long time? Jason Swails <jason.swails@gmail.com> - 2016-01-19 15:25 -0500

csiph-web