Skip to content

Commit 1836f8f

Browse files
iUpdate docstrings.
1 parent 3105620 commit 1836f8f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Doc/library/getopt.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ exception:
5151
long options which should be supported. The leading ``'--'`` characters
5252
should not be included in the option name. Long options which require an
5353
argument should be followed by an equal sign (``'='``).
54-
Long options which take an optional argument should be followed by
54+
Long options which acept an optional argument should be followed by
5555
an equal sign and question mark (``'=?'``).
5656
To accept only long options, *shortopts* should be an
5757
empty string. Long options on the command line can be recognized so long as

Lib/getopt.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@ def getopt(args, shortopts, longopts = []):
5757
running program. Typically, this means "sys.argv[1:]". shortopts
5858
is the string of option letters that the script wants to
5959
recognize, with options that require an argument followed by a
60-
colon (i.e., the same format that Unix getopt() uses). If
60+
colon and options that accept an optional argument followed by
61+
two colons (i.e., the same format that Unix getopt() uses). If
6162
specified, longopts is a list of strings with the names of the
6263
long options which should be supported. The leading '--'
6364
characters should not be included in the option name. Options
6465
which require an argument should be followed by an equal sign
65-
('=').
66+
('='). Options which acept an optional argument should be
67+
followed by an equal sign and question mark ('=?').
6668
6769
The return value consists of two elements: the first is a list of
6870
(option, value) pairs; the second is the list of program arguments

0 commit comments

Comments
 (0)