range to xrange (leftovers)

This commit is contained in:
Miroslav Stampar 2015-10-09 13:48:21 +02:00
parent 439d003753
commit 41db0e0eea
5 changed files with 6 additions and 6 deletions

View file

@ -51,7 +51,7 @@ class EUCJPProber(MultiByteCharSetProber):
def feed(self, aBuf):
aLen = len(aBuf)
for i in range(0, aLen):
for i in xrange(0, aLen):
# PY3K: aBuf is a byte array, so aBuf[i] is an int, not a byte
codingState = self._mCodingSM.next_state(aBuf[i])
if codingState == constants.eError:

View file

@ -52,7 +52,7 @@ class MultiByteCharSetProber(CharSetProber):
def feed(self, aBuf):
aLen = len(aBuf)
for i in range(0, aLen):
for i in xrange(0, aLen):
codingState = self._mCodingSM.next_state(aBuf[i])
if codingState == constants.eError:
if constants._debug:

View file

@ -51,7 +51,7 @@ class SJISProber(MultiByteCharSetProber):
def feed(self, aBuf):
aLen = len(aBuf)
for i in range(0, aLen):
for i in xrange(0, aLen):
codingState = self._mCodingSM.next_state(aBuf[i])
if codingState == constants.eError:
if constants._debug:

View file

@ -69,7 +69,7 @@ class UTF8Prober(CharSetProber):
def get_confidence(self):
unlike = 0.99
if self._mNumOfMBChar < 6:
for i in range(0, self._mNumOfMBChar):
for i in xrange(0, self._mNumOfMBChar):
unlike = unlike * ONE_CHAR_PROB
return 1.0 - unlike
else: