mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
Closes #28713 uses OSError in the tutorial
This commit is contained in:
parent
df66b9c425
commit
ecbca357c9
1 changed files with 1 additions and 1 deletions
|
@ -174,7 +174,7 @@ example::
|
|||
for arg in sys.argv[1:]:
|
||||
try:
|
||||
f = open(arg, 'r')
|
||||
except IOError:
|
||||
except OSError:
|
||||
print('cannot open', arg)
|
||||
else:
|
||||
print(arg, 'has', len(f.readlines()), 'lines')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue