Upstream Suor/funcy state of the touched files before c0960e614e
This commit is contained in:
1 parent
67695a8058
commit
f15f2b80fb
2 files changed
+2
-18
No files matched your search
+2
-6
@@ -363,12 +363,8 @@ def _cut_iter(drop_tail, n, step, seq):
|
||||
if len(pool) < n:
|
||||
break
|
||||
yield pool
|
||||
if step < n:
|
||||
pool = pool[step:]
|
||||
pool.extend(islice(it, step))
|
||||
else:
|
||||
take(step - n, it) # discard the gap between parts
|
||||
pool = take(n, it)
|
||||
pool = pool[step:]
|
||||
pool.extend(islice(it, step))
|
||||
if not drop_tail:
|
||||
for item in _cut_seq(drop_tail, n, step, pool):
|
||||
yield item
|
||||
|
||||
Reference in new issue
Block a user