Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7e4b66b

Browse filesBrowse files
[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
Copy full SHA for 7e4b66b

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎Doc/library/__main__.rst

Copy file name to clipboardExpand all lines: Doc/library/__main__.rst
+1-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.