I struggled with this until I saw from_iterable in the docs for itertools.chain.


On Sep 15, 2013, at 10:01 PM, Matthew Rocklin <notifications@github.com> wrote:

> In itertoolz/core.py:
> 
> > +    >>> comp(lambda a: a * 2, lambda b: b + 4)(3)
> > +    14
> > +    """
> > +    def f(*args, **kwargs):
> > +        return a(b(*args, **kwargs))
> > +    return f
> > +
> > +
> > +def concat(seqs):
> > +    """
> > +    Concatenate zero or more iterables, any of which may be infinite
> > +    (obviously, an infinite sequence will prevent the rest of the
> > +    arguments from being included).
> > +
> > +    We use chain.from_iterable rather than chain(*seqs) so that seqs
> > +    can be a generator.
> Right. I should learn the reference for this. I think in SymPy we pointed to some internal numpy doc.
> 
> —
> Reply to this email directly or view it on GitHub.
>