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

Skip to content

Commit 443653a

Browse files
authored
Convert six.moves.xrange() to range for Python 3
Remove import of xrange() and convert xrange() to range()
1 parent 2b83aa6 commit 443653a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/cbook/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
unicode_literals)
1111

1212
import six
13-
from six.moves import xrange, zip
13+
from six.moves import zip
1414
from itertools import repeat
1515
import collections
1616
import datetime
@@ -900,7 +900,7 @@ def get_split_ind(seq, N):
900900

901901
s_len = 0
902902
# todo: use Alex's xrange pattern from the cbook for efficiency
903-
for (word, ind) in zip(seq, xrange(len(seq))):
903+
for (word, ind) in zip(seq, range(len(seq))):
904904
s_len += len(word) + 1 # +1 to account for the len(' ')
905905
if s_len >= N:
906906
return ind

0 commit comments

Comments
 (0)