summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Reddy Thatiparthy <thatiparthysreenivas@gmail.com>2018-01-02 23:01:06 +0530
committerTim Graham <timograham@gmail.com>2018-01-08 14:49:43 -0500
commitacd3baf2ae3f74846731447df66e8c3ce7a772f7 (patch)
tree58f700e6dfde76e861a93b58f2999bed4bdd5dfb
parent47a99d701277f6ec98e6fd220feb9c8a1e66718e (diff)
Improved readability of utils.datetime_safe._findall().
-rw-r--r--django/utils/datetime_safe.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/django/utils/datetime_safe.py b/django/utils/datetime_safe.py
index 3cc375b4f6..ed8420eb8e 100644
--- a/django/utils/datetime_safe.py
+++ b/django/utils/datetime_safe.py
@@ -61,12 +61,12 @@ def _findall(text, substr):
# Also finds overlaps
sites = []
i = 0
- while 1:
- j = text.find(substr, i)
- if j == -1:
+ while True:
+ i = text.find(substr, i)
+ if i == -1:
break
- sites.append(j)
- i = j + 1
+ sites.append(i)
+ i += 1
return sites