Skip to content

Commit 94bac1c

Browse files
[3.12] gh-112165: Fix typo in __main__.py (GH-112183) (#112184)
gh-112165: Fix typo in `__main__.py` (GH-112183) Change '[2]' to '[1]' to get second argument. (cherry picked from commit 8cd70ee) Co-authored-by: Terry Jan Reedy <[email protected]>
1 parent 8e37445 commit 94bac1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/library/__main__.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ students::
227227
import sys
228228
from .student import search_students
229229

230-
student_name = sys.argv[2] if len(sys.argv) >= 2 else ''
230+
student_name = sys.argv[1] if len(sys.argv) >= 2 else ''
231231
print(f'Found student: {search_students(student_name)}')
232232

233233
Note that ``from .student import search_students`` is an example of a relative

0 commit comments

Comments
 (0)