mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-25 23:11:02 +08:00
修正
This commit is contained in:
parent
d819f0cea7
commit
6061b5c21d
@ -258,8 +258,8 @@ def funky_for_loop(iterable, action_to_do):
|
|||||||
2. 反复从迭代器中获得下一项
|
2. 反复从迭代器中获得下一项
|
||||||
3. 如果我们成功获得下一项,就执行 `for` 循环的主体
|
3. 如果我们成功获得下一项,就执行 `for` 循环的主体
|
||||||
4. 如果我们在获得下一项时得到了一个 `StopIteration` 异常,那么就停止循环
|
4. 如果我们在获得下一项时得到了一个 `StopIteration` 异常,那么就停止循环
|
||||||
```
|
|
||||||
|
|
||||||
|
```
|
||||||
def funky_for_loop(iterable, action_to_do):
|
def funky_for_loop(iterable, action_to_do):
|
||||||
iterator = iter(iterable)
|
iterator = iter(iterable)
|
||||||
done_looping = False
|
done_looping = False
|
||||||
|
Loading…
Reference in New Issue
Block a user