xslice idea | a generator slice

Ian Kelly ian.g.kelly at gmail.com
Thu Jul 11 23:02:39 CEST 2013

On Thu, Jul 11, 2013 at 1:58 PM, Fábio Santos <fabiosantosart at gmail.com> wrote:
> Isn't all of itertools implemented in C? If we are not using a python-level
> and not-so-fast __getitem__ I would wager the C version is a lot faster.
> And if the input is indexable could I assume that it is not too large to
> have around in memory and thus any speed increase in looping over it would
> be tiny?

Oscar's version which is an imap of an xrange is also effectively
implemented in C.  Only the setup is in Python.

More information about the Python-list mailing list