mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue