Skip to content

Commit 3c0dca1

Browse files
committed
Merge pull request yidao620c#75 from 0x4ec7/patch-4
修改代码错误
2 parents 414614f + 8471960 commit 3c0dca1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/c04/p01_manually_consuming_iterator.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
3333
with open('/etc/passwd') as f:
3434
while True:
35-
line = next(f)
35+
line = next(f, None)
3636
if line is None:
3737
break
3838
print(line, end='')

0 commit comments

Comments
 (0)