Skip to content
Permalink
Browse files

tools: define xrange() in Python 3

__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 23, 2018
1 parent f42aa32 commit bade0fedcdd0db1148d840eaa17d7dbed2511bf7
Showing with 5 additions and 0 deletions.
  1. +5 −0 tools/cpplint.py
@@ -53,6 +53,11 @@
import sys
import unicodedata

try:
xrange
except NameError:
xrange = range


logger = logging.getLogger('testrunner')

0 comments on commit bade0fe

Please sign in to comment.
You can’t perform that action at this time.