Skip to content

Commit

Permalink
tools: 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
(#21942).

PR-URL: #21945
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
cclauss authored and addaleax committed Jul 27, 2018
1 parent f42aa32 commit bade0fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/cpplint.py
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 bade0fe

Please sign in to comment.