diff options
author | Jürgen Gmach <juergen.gmach@googlemail.com> | 2023-01-20 22:13:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-20 22:13:07 (GMT) |
commit | 9a155138c58cad409e28e34359ba87ec0025b6b7 (patch) | |
tree | a9acb095339cae64698021072c3468f4ab99e711 /Doc | |
parent | 61f338a005aa9f36b2a0a8d6924857e703bb6140 (diff) | |
download | cpython-9a155138c58cad409e28e34359ba87ec0025b6b7.zip cpython-9a155138c58cad409e28e34359ba87ec0025b6b7.tar.gz cpython-9a155138c58cad409e28e34359ba87ec0025b6b7.tar.bz2 |
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.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/optparse.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst index 47e6255..3e29fed 100644 --- a/Doc/library/optparse.rst +++ b/Doc/library/optparse.rst @@ -404,7 +404,7 @@ Other actions Some other actions supported by :mod:`optparse` are: ``"store_const"`` - store a constant value + store a constant value, pre-set via :attr:`Option.const` ``"append"`` 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_const"`` - store a constant value + store a constant value, pre-set via :attr:`Option.const` ``"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_const"`` - append a constant value to a list + append a constant value to a list, pre-set via :attr:`Option.const` ``"count"`` increment a counter by one |