pairwise fails with empty iterable
When called with an empty iterable, the next
call raise StopIteration
.
But we want to return an empty list.
When called with an empty iterable, the next
call raise StopIteration
.
But we want to return an empty list.