mirror of https://github.com/django/django.git
Improved readability of utils.datetime_safe._findall().
This commit is contained in:
parent
47a99d7012
commit
acd3baf2ae
|
@ -61,12 +61,12 @@ def _findall(text, substr):
|
||||||
# Also finds overlaps
|
# Also finds overlaps
|
||||||
sites = []
|
sites = []
|
||||||
i = 0
|
i = 0
|
||||||
while 1:
|
while True:
|
||||||
j = text.find(substr, i)
|
i = text.find(substr, i)
|
||||||
if j == -1:
|
if i == -1:
|
||||||
break
|
break
|
||||||
sites.append(j)
|
sites.append(i)
|
||||||
i = j + 1
|
i += 1
|
||||||
return sites
|
return sites
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue