In the example iterating over sys.argv and opening each argument,
change it to iterate over sys.argv[1:]. Suggestion by Gerry Wiener.
This commit is contained in:
parent
7c29b2328b
commit
a4289a79f8
|
@ -2708,7 +2708,7 @@ useful to place code that must be executed if the try clause does not
|
|||
raise an exception. For example:
|
||||
|
||||
\begin{verbatim}
|
||||
for arg in sys.argv:
|
||||
for arg in sys.argv[1:]:
|
||||
try:
|
||||
f = open(arg, 'r')
|
||||
except IOError:
|
||||
|
|
Loading…
Reference in New Issue