Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 41db0e0

Browse files
committed
range to xrange (leftovers)
1 parent 439d003 commit 41db0e0

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

lib/takeover/udf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def udfInjectCustom(self):
258258
else:
259259
logger.warn("invalid value, only digits are allowed")
260260

261-
for x in range(0, udfCount):
261+
for x in xrange(0, udfCount):
262262
while True:
263263
msg = "what is the name of the UDF number %d? " % (x + 1)
264264
udfName = readInput(msg)
@@ -293,7 +293,7 @@ def udfInjectCustom(self):
293293
else:
294294
logger.warn("invalid value, only digits >= 0 are allowed")
295295

296-
for y in range(0, parCount):
296+
for y in xrange(0, parCount):
297297
msg = "what is the data-type of input parameter "
298298
msg += "number %d? (default: %s) " % ((y + 1), defaultType)
299299

thirdparty/chardet/eucjpprober.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def get_charset_name(self):
5151

5252
def feed(self, aBuf):
5353
aLen = len(aBuf)
54-
for i in range(0, aLen):
54+
for i in xrange(0, aLen):
5555
# PY3K: aBuf is a byte array, so aBuf[i] is an int, not a byte
5656
codingState = self._mCodingSM.next_state(aBuf[i])
5757
if codingState == constants.eError:

thirdparty/chardet/mbcharsetprober.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def get_charset_name(self):
5252

5353
def feed(self, aBuf):
5454
aLen = len(aBuf)
55-
for i in range(0, aLen):
55+
for i in xrange(0, aLen):
5656
codingState = self._mCodingSM.next_state(aBuf[i])
5757
if codingState == constants.eError:
5858
if constants._debug:

thirdparty/chardet/sjisprober.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def get_charset_name(self):
5151

5252
def feed(self, aBuf):
5353
aLen = len(aBuf)
54-
for i in range(0, aLen):
54+
for i in xrange(0, aLen):
5555
codingState = self._mCodingSM.next_state(aBuf[i])
5656
if codingState == constants.eError:
5757
if constants._debug:

thirdparty/chardet/utf8prober.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def feed(self, aBuf):
6969
def get_confidence(self):
7070
unlike = 0.99
7171
if self._mNumOfMBChar < 6:
72-
for i in range(0, self._mNumOfMBChar):
72+
for i in xrange(0, self._mNumOfMBChar):
7373
unlike = unlike * ONE_CHAR_PROB
7474
return 1.0 - unlike
7575
else:

0 commit comments

Comments
 (0)