Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
  • Loading branch information
terryjreedy authored and miss-islington committed Nov 17, 2023
commit 3c6f61d6c4d33b0d20b6948bd6d00543a72c2933
2 changes: 1 addition & 1 deletion Doc/library/__main__.rst
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ students::
import sys
from .student import search_students

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

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