summaryrefslogtreecommitdiff
path: root/Doc/library/getopt.rst
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2010-11-18 16:38:46 +0000
committerÉric Araujo <merwok@netwok.org>2010-11-18 16:38:46 +0000
commit99cde9cf2f7949423a0229d4ec28aafe12381bc7 (patch)
tree68b6494288a9d64a9b4e1c7f9a78ed7b747af330 /Doc/library/getopt.rst
parent89e60d7712ac71a49976d9775ec9e661c20cfc1e (diff)
downloadcpython-99cde9cf2f7949423a0229d4ec28aafe12381bc7.tar.gz
Fix usage of :option: in the docs (#9312).
:option: is used to create a link to an option of python, not to mark up any instance of any arbitrary command-line option. These were changed to ````. For modules which do have a command-line interface, lists of options have been properly marked up with the program/cmdoption directives combo. Options defined in such blocks can be linked to with :option: later in the same file, they won’t link to an option of python. Finally, the markup of command-line fragments in optparse.rst has been cleaned to use ``x`` instead of ``"x"``, keeping that latter form for actual Python strings. Patch by Eli Bendersky and Éric Araujo.
Diffstat (limited to 'Doc/library/getopt.rst')
-rw-r--r--Doc/library/getopt.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/getopt.rst b/Doc/library/getopt.rst
index b80af01a4c..28e1cdbf33 100644
--- a/Doc/library/getopt.rst
+++ b/Doc/library/getopt.rst
@@ -47,7 +47,7 @@ exception:
empty string. Long options on the command line can be recognized so long as
they provide a prefix of the option name that matches exactly one of the
accepted options. For example, if *longopts* is ``['foo', 'frob']``, the
- option :option:`--fo` will match as :option:`--foo`, but :option:`--f` will
+ option ``--fo`` will match as ``--foo``, but ``--f`` will
not match uniquely, so :exc:`GetoptError` will be raised.
The return value consists of two elements: the first is a list of ``(option,
@@ -68,7 +68,7 @@ exception:
intermixed. The :func:`getopt` function stops processing options as soon as a
non-option argument is encountered.
- If the first character of the option string is '+', or if the environment
+ If the first character of the option string is ``'+'``, or if the environment
variable :envvar:`POSIXLY_CORRECT` is set, then option processing stops as
soon as a non-option argument is encountered.