mirror of
https://github.com/python/cpython.git
synced 2025-09-21 16:10:33 +00:00
Minor code nit: Move an unrelated statement out of a try clause in Sequence.index (GH-32330)
This commit is contained in:
parent
884eba3c76
commit
59a99ae277
1 changed files with 2 additions and 2 deletions
|
@ -1022,10 +1022,10 @@ class Sequence(Reversible, Collection):
|
||||||
while stop is None or i < stop:
|
while stop is None or i < stop:
|
||||||
try:
|
try:
|
||||||
v = self[i]
|
v = self[i]
|
||||||
if v is value or v == value:
|
|
||||||
return i
|
|
||||||
except IndexError:
|
except IndexError:
|
||||||
break
|
break
|
||||||
|
if v is value or v == value:
|
||||||
|
return i
|
||||||
i += 1
|
i += 1
|
||||||
raise ValueError
|
raise ValueError
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue