Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit 37713e6

Browse files
committed
#230 - Fixing Python3 compatability
1 parent 18caa72 commit 37713e6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/pydocstyle/checker.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import string
55
import sys
66
import tokenize as tk
7-
from itertools import takewhile, tee, izip_longest
7+
from itertools import takewhile, tee
88
from re import compile as re
99
from collections import namedtuple
1010

@@ -14,6 +14,11 @@
1414
Method, Function, NestedFunction, Parser, StringIO)
1515
from .utils import log, is_blank
1616

17+
try:
18+
from itertools import zip_longest
19+
except ImportError
20+
from itertools import izip_longest as zip_longest
21+
1722

1823
__all__ = ('check', )
1924

@@ -41,7 +46,7 @@ def pairwise(iterable, default_value):
4146
"""
4247
a, b = tee(iterable)
4348
_ = next(b, default_value)
44-
return izip_longest(a, b, fillvalue=default_value)
49+
return zip_longest(a, b, fillvalue=default_value)
4550

4651

4752
class ConventionChecker(object):

0 commit comments

Comments
 (0)