diff options
Diffstat (limited to 'Doc/library/getopt.rst')
-rw-r--r-- | Doc/library/getopt.rst | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Doc/library/getopt.rst b/Doc/library/getopt.rst index 31bd911..9277b96 100644 --- a/Doc/library/getopt.rst +++ b/Doc/library/getopt.rst @@ -82,7 +82,7 @@ exception: Alias for :exc:`GetoptError`; for backward compatibility. -An example using only Unix style options:: +An example using only Unix style options: >>> import getopt >>> args = '-a -b -cfoo -d bar a1 a2'.split() @@ -94,7 +94,7 @@ An example using only Unix style options:: >>> args ['a1', 'a2'] -Using long option names is equally easy:: +Using long option names is equally easy: >>> s = '--condition=foo --testing --output-file abc.def -x a1 a2' >>> args = s.split() @@ -103,8 +103,7 @@ Using long option names is equally easy:: >>> optlist, args = getopt.getopt(args, 'x', [ ... 'condition=', 'output-file=', 'testing']) >>> optlist - [('--condition', 'foo'), ('--testing', ''), ('--output-file', 'abc.def'), ('-x', - '')] + [('--condition', 'foo'), ('--testing', ''), ('--output-file', 'abc.def'), ('-x', '')] >>> args ['a1', 'a2'] |