From 3105620547c29712ebe02dd81805bb84040367f1 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 4 Nov 2024 09:57:06 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Brian Schubert --- Doc/library/getopt.rst | 2 +- Doc/whatsnew/3.14.rst | 2 +- .../next/Library/2024-11-03-23-25-07.gh-issue-126374.Xu_THP.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/getopt.rst b/Doc/library/getopt.rst index 22e2bc461bbf05..3e5aa6022ca21c 100644 --- a/Doc/library/getopt.rst +++ b/Doc/library/getopt.rst @@ -38,7 +38,7 @@ exception: be parsed, without the leading reference to the running program. Typically, this means ``sys.argv[1:]``. *shortopts* is the string of option letters that the script wants to recognize, with options that require an argument followed by a - colon (``':'``) and options that takes an optional argument followed by + colon (``':'``) and options that accept an optional argument followed by two colons (``'::'``); i.e., the same format that Unix :c:func:`!getopt` uses. .. note:: diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 8e17e4a8bea371..937a1a8a6df46d 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -313,7 +313,7 @@ functools getopt ------ -* Add support of options with optional arguments. +* Add support for options with optional arguments. (Contributed by Serhiy Storchaka in :gh:`126374`.) http diff --git a/Misc/NEWS.d/next/Library/2024-11-03-23-25-07.gh-issue-126374.Xu_THP.rst b/Misc/NEWS.d/next/Library/2024-11-03-23-25-07.gh-issue-126374.Xu_THP.rst index 3946211e85fde4..ad7ecfb6af9ec8 100644 --- a/Misc/NEWS.d/next/Library/2024-11-03-23-25-07.gh-issue-126374.Xu_THP.rst +++ b/Misc/NEWS.d/next/Library/2024-11-03-23-25-07.gh-issue-126374.Xu_THP.rst @@ -1 +1 @@ -Add support of options with optional arguments in the :mod:`getopt` module. +Add support for options with optional arguments in the :mod:`getopt` module.