summaryrefslogtreecommitdiffstats
path: root/Doc/library/getopt.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-08-31 17:17:17 (GMT)
committerGeorg Brandl <georg@python.org>2007-08-31 17:17:17 (GMT)
commit81ac1ce56af43a37d963ec8aecb7069b7edb2077 (patch)
tree8e79225231f5e8b2fea8527d29b1274df128f05a /Doc/library/getopt.rst
parentdcc56f8bf668965ef5f3cfe2fd6a07b7b84b08a8 (diff)
downloadcpython-81ac1ce56af43a37d963ec8aecb7069b7edb2077.zip
cpython-81ac1ce56af43a37d963ec8aecb7069b7edb2077.tar.gz
cpython-81ac1ce56af43a37d963ec8aecb7069b7edb2077.tar.bz2
Address a few XXX comments, other fixes.
Diffstat (limited to 'Doc/library/getopt.rst')
-rw-r--r--Doc/library/getopt.rst8
1 files changed, 3 insertions, 5 deletions
diff --git a/Doc/library/getopt.rst b/Doc/library/getopt.rst
index 0d9641d..53a3d2b 100644
--- a/Doc/library/getopt.rst
+++ b/Doc/library/getopt.rst
@@ -9,13 +9,11 @@
This module helps scripts to parse the command line arguments in ``sys.argv``.
It supports the same conventions as the Unix :cfunc:`getopt` function (including
-the special meanings of arguments of the form '``-``' and '``-``\ ``-``'). Long
+the special meanings of arguments of the form '``-``' and '``--``'). Long
options similar to those supported by GNU software may be used as well via an
optional third argument. This module provides a single function and an
exception:
-.. % That's to fool latex2html into leaving the two hyphens alone!
-
.. function:: getopt(args, options[, long_options])
@@ -32,7 +30,7 @@ exception:
work.
*long_options*, if specified, must be a list of strings with the names of the
- long options which should be supported. The leading ``'-``\ ``-'`` characters
+ long options which should be supported. The leading ``'--'`` characters
should not be included in the option name. Long options which require an
argument should be followed by an equal sign (``'='``). To accept only long
options, *options* should be an empty string. Long options on the command line
@@ -46,7 +44,7 @@ exception:
option list was stripped (this is a trailing slice of *args*). Each
option-and-value pair returned has the option as its first element, prefixed
with a hyphen for short options (e.g., ``'-x'``) or two hyphens for long
- options (e.g., ``'-``\ ``-long-option'``), and the option argument as its
+ options (e.g., ``'--long-option'``), and the option argument as its
second element, or an empty string if the option has no argument. The
options occur in the list in the same order in which they were found, thus
allowing multiple occurrences. Long and short options may be mixed.