Skip to content

Commit 9a15513

Browse files
authored
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.
1 parent 61f338a commit 9a15513

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/library/optparse.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ Other actions
404404
Some other actions supported by :mod:`optparse` are:
405405

406406
``"store_const"``
407-
store a constant value
407+
store a constant value, pre-set via :attr:`Option.const`
408408

409409
``"append"``
410410
append this option's argument to a list
@@ -925,7 +925,7 @@ The canonical way to create an :class:`Option` instance is with the
925925
store this option's argument (default)
926926

927927
``"store_const"``
928-
store a constant value
928+
store a constant value, pre-set via :attr:`Option.const`
929929

930930
``"store_true"``
931931
store ``True``
@@ -937,7 +937,7 @@ The canonical way to create an :class:`Option` instance is with the
937937
append this option's argument to a list
938938

939939
``"append_const"``
940-
append a constant value to a list
940+
append a constant value to a list, pre-set via :attr:`Option.const`
941941

942942
``"count"``
943943
increment a counter by one

0 commit comments

Comments
 (0)