~ubuntu-branches/ubuntu/saucy/python2.7/saucy-proposed

« back to all changes in this revision

Viewing changes to Doc/howto/argparse.rst

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-05-15 19:15:16 UTC
  • mto: (36.1.23 sid)
  • mto: This revision was merged to the branch mainline in revision 87.
  • Revision ID: package-import@ubuntu.com-20130515191516-zmv6to904wemey7s
Tags: upstream-2.7.5
ImportĀ upstreamĀ versionĀ 2.7.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
.. note::
13
13
 
14
 
   There's two other modules that fulfill the same task, namely
 
14
   There are two other modules that fulfill the same task, namely
15
15
   :mod:`getopt` (an equivalent for :c:func:`getopt` from the C
16
16
   language) and the deprecated :mod:`optparse`.
17
17
   Note also that :mod:`argparse` is based on :mod:`optparse`,
668
668
So far, we have been working with two methods of an
669
669
:class:`argparse.ArgumentParser` instance. Let's introduce a third one,
670
670
:meth:`add_mutually_exclusive_group`. It allows for us to specify options that
671
 
conflict with each other. Let's also change the rest of the program make the
672
 
new functionality makes more sense:
 
671
conflict with each other. Let's also change the rest of the program so that
 
672
the new functionality makes more sense:
673
673
we'll introduce the ``--quiet`` option,
674
674
which will be the opposite of the ``--verbose`` one::
675
675