Kaydet (Commit) ecbca357 authored tarafından Kushal Das's avatar Kushal Das

Closes #28713 uses OSError in the tutorial

üst df66b9c4
......@@ -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')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment