mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
gh-103921: Rename "type" header in argparse docs (#104654)
This allows :keyword:`type` to link to docs for the new `type` statement (being written in gh-104642) instead of to this header in the argparse docs.
This commit is contained in:
parent
a412fc58cc
commit
ab8f54668b
1 changed files with 15 additions and 15 deletions
|
@ -57,9 +57,9 @@ the extracted data in a :class:`argparse.Namespace` object::
|
||||||
Quick Links for add_argument()
|
Quick Links for add_argument()
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
====================== =========================================================== ==========================================================================================================================
|
============================ =========================================================== ==========================================================================================================================
|
||||||
Name Description Values
|
Name Description Values
|
||||||
====================== =========================================================== ==========================================================================================================================
|
============================ =========================================================== ==========================================================================================================================
|
||||||
action_ Specify how an argument should be handled ``'store'``, ``'store_const'``, ``'store_true'``, ``'append'``, ``'append_const'``, ``'count'``, ``'help'``, ``'version'``
|
action_ Specify how an argument should be handled ``'store'``, ``'store_const'``, ``'store_true'``, ``'append'``, ``'append_const'``, ``'count'``, ``'help'``, ``'version'``
|
||||||
choices_ Limit values to a specific set of choices ``['foo', 'bar']``, ``range(1, 10)``, or :class:`~collections.abc.Container` instance
|
choices_ Limit values to a specific set of choices ``['foo', 'bar']``, ``range(1, 10)``, or :class:`~collections.abc.Container` instance
|
||||||
const_ Store a constant value
|
const_ Store a constant value
|
||||||
|
@ -69,8 +69,8 @@ help_ Help message for an argument
|
||||||
metavar_ Alternate display name for the argument as shown in help
|
metavar_ Alternate display name for the argument as shown in help
|
||||||
nargs_ Number of times the argument can be used :class:`int`, ``'?'``, ``'*'``, or ``'+'``
|
nargs_ Number of times the argument can be used :class:`int`, ``'?'``, ``'*'``, or ``'+'``
|
||||||
required_ Indicate whether an argument is required or optional ``True`` or ``False``
|
required_ Indicate whether an argument is required or optional ``True`` or ``False``
|
||||||
type_ Automatically convert an argument to the given type :class:`int`, :class:`float`, ``argparse.FileType('w')``, or callable function
|
:ref:`type <argparse-type>` Automatically convert an argument to the given type :class:`int`, :class:`float`, ``argparse.FileType('w')``, or callable function
|
||||||
====================== =========================================================== ==========================================================================================================================
|
============================ =========================================================== ==========================================================================================================================
|
||||||
|
|
||||||
|
|
||||||
Example
|
Example
|
||||||
|
@ -1132,7 +1132,7 @@ command-line argument was not present::
|
||||||
Namespace(foo='1')
|
Namespace(foo='1')
|
||||||
|
|
||||||
|
|
||||||
.. _type:
|
.. _argparse-type:
|
||||||
|
|
||||||
type
|
type
|
||||||
^^^^
|
^^^^
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue