Skip to content

Commit 099f059

Browse files
author
cclauss
authored
cpplint_unittest.py: Define xrange for Python 3
1 parent d98652e commit 099f059

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cpplint/cpplint_unittest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@
4343

4444
import cpplint
4545

46+
try:
47+
xrange # Python 2
48+
except NameError:
49+
xrange = range # Python 3
50+
4651

4752
# This class works as an error collector and replaces cpplint.Error
4853
# function for the unit tests. We also verify each category we see

0 commit comments

Comments
 (0)