llllllllll / slider

Utilities for working with osu! files and data
https://llllllllll.github.io/slider/index.html
GNU Lesser General Public License v3.0
39 stars 17 forks source link

remove toolz as a dependency #76

Closed tybug closed 4 years ago

tybug commented 4 years ago

personally I don't think we should have a dependency (even a light one) for only one or two use cases we can replace ourselves, but will leave that decision up to you @llllllllll.

To convince yourself the functionality is the same:

from toolz import sliding_window
import random

maxint = 10000

for _ in range(500):
    rand_list = [random.randint(0, maxint) for _ in range(100)]
    assert list(sliding_window(2, rand_list)) == list(zip(rand_list, rand_list[1:]))