GH-101111: Disambigaute origin of const for store_const and append_const (#101121)

While the documentation for `optparse` mentioned that both `store_const` and
`append_const` store a constant value, it was not clear where this value was
coming from.

A link to `Option.const` makes this explicit.
This commit is contained in:
Jürgen Gmach 2023-01-20 23:13:07 +01:00 committed by GitHub
parent 61f338a005
commit 9a155138c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -404,7 +404,7 @@ Other actions
Some other actions supported by :mod:`optparse` are: Some other actions supported by :mod:`optparse` are:
``"store_const"`` ``"store_const"``
store a constant value store a constant value, pre-set via :attr:`Option.const`
``"append"`` ``"append"``
append this option's argument to a list append this option's argument to a list
@ -925,7 +925,7 @@ The canonical way to create an :class:`Option` instance is with the
store this option's argument (default) store this option's argument (default)
``"store_const"`` ``"store_const"``
store a constant value store a constant value, pre-set via :attr:`Option.const`
``"store_true"`` ``"store_true"``
store ``True`` store ``True``
@ -937,7 +937,7 @@ The canonical way to create an :class:`Option` instance is with the
append this option's argument to a list append this option's argument to a list
``"append_const"`` ``"append_const"``
append a constant value to a list append a constant value to a list, pre-set via :attr:`Option.const`
``"count"`` ``"count"``
increment a counter by one increment a counter by one