From 9b087729d343f77248eedd19f1c2169258e1890d Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Tue, 26 Sep 2017 01:04:09 +0200 Subject: [PATCH] Fix flatisfy.tools.batch with Python3 --- flatisfy/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flatisfy/tools.py b/flatisfy/tools.py index 152f75b..d5b5da1 100644 --- a/flatisfy/tools.py +++ b/flatisfy/tools.py @@ -105,7 +105,7 @@ def batch(iterable, size): sourceiter = iter(iterable) while True: batchiter = itertools.islice(sourceiter, size) - yield itertools.chain([batchiter.next()], batchiter) + yield itertools.chain([next(batchiter)], batchiter) def is_within_interval(value, min_value=None, max_value=None):