8000 [3.11] gh-112165: Fix typo in `__main__.py` (GH-112183) (#112185) · python/cpython@7e4b66b · GitHub
[go: up one dir, main page]

Skip to content

Commit 7e4b66b

Browse files
miss-islingtonterryjreedy
andauthored
< 8000 /div>
[3.11] gh-112165: Fix typo in __main__.py (GH-112183) (#112185)
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 <tjreedy@udel.edu>
1 parent 533da5e commit 7e4b66b

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)
0