mirror of
https://github.com/python/cpython.git
synced 2025-09-29 03:35:31 +00:00
[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 8cd70eefc7
)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
parent
8e37445044
commit
94bac1c407
1 changed files with 1 additions and 1 deletions
|
@ -227,7 +227,7 @@ students::
|
||||||
import sys
|
import sys
|
||||||
from .student import search_students
|
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)}')
|
print(f'Found student: {search_students(student_name)}')
|
||||||
|
|
||||||
Note that ``from .student import search_students`` is an example of a relative
|
Note that ``from .student import search_students`` is an example of a relative
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue