Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Fix Py3 compatibility, refactor itertools.izip_longest
Browse files Browse the repository at this point in the history
  • Loading branch information
BigRoy committed Jan 5, 2022
1 parent d3eca27 commit eca18fa
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def grouper(iterable, n, fillvalue=None):
"""
args = [iter(iterable)] * n
return itertools.izip_longest(fillvalue=fillvalue, *args)
from six.moves import zip_longest
return zip_longest(fillvalue=fillvalue, *args)


def unlock(plug):
Expand Down

0 comments on commit eca18fa

Please sign in to comment.