avoid incrementing iterator when not appropriate
By chance, this hasn't caused any problems yet.
This commit is contained in:
parent
f0bd41f65a
commit
4875f7c1f5
@ -453,6 +453,7 @@ def _privatize_line(line: str, replacement_table: Dict[str, str],
|
|||||||
# as is needed for slice notation.
|
# as is needed for slice notation.
|
||||||
if increment_iterator_by:
|
if increment_iterator_by:
|
||||||
start_idx = iterator.send(increment_iterator_by)
|
start_idx = iterator.send(increment_iterator_by)
|
||||||
|
increment_iterator_by = 0
|
||||||
else:
|
else:
|
||||||
start_idx = next(iterator)
|
start_idx = next(iterator)
|
||||||
end_idx = start_idx + len(replace_person)
|
end_idx = start_idx + len(replace_person)
|
||||||
|
Loading…
Reference in New Issue
Block a user