Skip to content

Commit

Permalink
Define xrange() in Python 3
Browse files Browse the repository at this point in the history
__xrange()__ was removed in Python 3 in favor of __range()__.  This PR ensures similar functionality on both Python 2 and Python 3.

Discovered via https://travis-ci.com/nodejs/node/builds/79706150 (nodejs#21942)
  • Loading branch information
cclauss authored Jul 23, 2018
1 parent 0e4cbde commit bbec82b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/cpplint.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
import sys
import unicodedata

try:
xrange
except NameError:
xrange = range


logger = logging.getLogger('testrunner')

Expand Down

0 comments on commit bbec82b

Please sign in to comment.