reduceby takes callable init keyword argument

Done.

On Sat, Dec 20, 2014 at 11:19 AM, Erik Welch <notifications@github.com>
wrote:

> In toolz/tests/test_itertoolz.py
> <https://github.com/pytoolz/toolz/pull/206#discussion-diff-22143426>:
>
> > @@ -235,6 +235,15 @@ def test_reduce_by_init():
> >      assert reduceby(iseven, add, [1, 2, 3, 4]) == {True: 2 + 4, False: 1 + 3}
> >
> >
> > +def test_reduce_by_callable_default():
> > +    def set_add(s, i):
> > +        s.add(i)
> > +        return s
> > +
> > +    assert reduceby(iseven, set_add, [1, 2, 3, 4, 1, 2], set) == \
> > +            {True: set([2, 4]), False: set([1, 3])}
>
> Remove four spaces here so we can get this merged. This is not pep8 at its
> best.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/pytoolz/toolz/pull/206/files#r22143426>.
>