Skip to content

Commit

Permalink
pythongh-112165: Fix typo in __main__.py (python#112183)
Browse files Browse the repository at this point in the history
Change '[2]' to '[1]' to get second argument.
  • Loading branch information
terryjreedy authored and aisk committed Feb 11, 2024
1 parent fd3ade0 commit d0b5576
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit d0b5576

Please sign in to comment.