Print option lists.
This class has been designed in order to implement options that print
elements of a @c list and immediately quit the parser without taking care
of any other arguments. This behavior is like the help or version option,
as it quits after printing something. A typical example is
@code
import argparse
parser = argparse.ArgumentParser(description='Print possible options.')
parser.register('action', 'choices', _CPrintChoicesAction)
parser.add_argument('--list-keywords', choices=('foo', 'bar'), action='choices')
parser.parse_args(['--list-keywords', '--will-be-ignored'])
@endcode
where only output of the options 'foo' and 'bar' is enforeced, even if the
program itself serves a different purpose.
This functionality can only be
implemented as a separate action, since as a simple option it would
undergo all command line option checking prior to printing and therefore
would raise errors since other mandatory options were not be supplied.
@param option_strings Name(s) of the option, eg. '--list-keywords'.
@param choices @c List of @c strings to print.