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:
Guido van Rossum 1998-07-07 20:18:06 +00:00
parent 7c29b2328b
commit a4289a79f8
1 changed files with 1 additions and 1 deletions

View File

@ -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: