Commit ceb0e1d7 authored by Benjamin Peterson's avatar Benjamin Peterson

the correct role is :meth: not :method:

parent 4ec38f6b
...@@ -1213,19 +1213,17 @@ Action classes ...@@ -1213,19 +1213,17 @@ Action classes
^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
Action classes implement the Action API, a callable which returns a callable Action classes implement the Action API, a callable which returns a callable
which processes arguments from the command-line. Any object which follows which processes arguments from the command-line. Any object which follows this
this API may be passed as the ``action`` parameter to API may be passed as the ``action`` parameter to :meth:`add_argument`.
:method:`add_argument`.
.. class:: Action(option_strings, dest, nargs=None, const=None, default=None, .. class:: Action(option_strings, dest, nargs=None, const=None, default=None,
type=None, choices=None, required=False, help=None, type=None, choices=None, required=False, help=None,
metavar=None) metavar=None)
Action objects are used by an ArgumentParser to represent the information Action objects are used by an ArgumentParser to represent the information needed
needed to parse a single argument from one or more strings from the to parse a single argument from one or more strings from the command line. The
command line. The Action class must accept the two positional arguments Action class must accept the two positional arguments plus any keyword arguments
plus any keyword arguments passed to :method:`ArgumentParser.add_argument` passed to :meth:`ArgumentParser.add_argument` except for the ``action`` itself.
except for the ``action`` itself.
Instances of Action (or return value of any callable to the ``action`` Instances of Action (or return value of any callable to the ``action``
parameter) should have attributes "dest", "option_strings", "default", "type", parameter) should have attributes "dest", "option_strings", "default", "type",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment