Skip to content

Commit

Permalink
[3.11] pythonGH-101111: Disambigaute origin of const for store_const …
Browse files Browse the repository at this point in the history
…and append_const (pythonGH-101121) (python#101203)

(cherry picked from commit 9a15513)

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.

Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com>
  • Loading branch information
miss-islington and jugmac00 authored Jan 20, 2023
1 parent 1798df2 commit efc89f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Doc/library/optparse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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``
Expand All @@ -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
Expand Down

0 comments on commit efc89f3

Please sign in to comment.