[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-04-15 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-04-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset c42a9233af04 by Martin Panter in branch '2.7': Issue #25314: Remove confused statement about const argument https://hg.python.org/cpython/rev/c42a9233af04 New changeset 59b8db278e3c by Martin Panter in branch '3.5': Issue #25314: Remove confused

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-04-08 Thread Martin Panter
Changes by Martin Panter : Added file: http://bugs.python.org/file42408/store_const.v2.patch ___ Python tracker ___

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-04-08 Thread Martin Panter
Changes by Martin Panter : Removed file: http://bugs.python.org/file42407/store_const.v2.patch ___ Python tracker ___

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-04-08 Thread Martin Panter
Martin Panter added the comment: Patch with the outstanding change for const, plus an extra fix under the main description. -- Added file: http://bugs.python.org/file42407/store_const.v2.patch ___ Python tracker

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-03-28 Thread Martin Panter
Martin Panter added the comment: For the record, porting the change was rather easy (hg graft + tweak + hg commit --amend). With that applied, I think it eliminates the need for the store_true/false half of Julien’s patch. Is the store_const half of Julien’s patch ready to commit? --

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-03-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 566fe3564684 by Raymond Hettinger in branch '3.5': Issue #25314: store_true and store_false also create appropriate defaults. https://hg.python.org/cpython/rev/566fe3564684 New changeset 9fdeca5fdbf0 by Martin Panter in branch 'default': Issue

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-01-28 Thread Martin Panter
Martin Panter added the comment: I definitely agree with removing the remark about the “const” value with store_const. People here seem to be overloading the terms “default” and “argument”. When using store_const, it seems the programmer must also specify a value for the “const” parameter to

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-01-28 Thread paul j3
paul j3 added the comment: How about: These store the values True and False respectively (and default to False and True if absent). The reference to `store_const` is confusing, since almost no one uses that action. The `store_const` paragraph has: (Note that the const keyword

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-01-28 Thread Julien Baley
Julien Baley added the comment: I like paul.j3's suggestion, but it would probably make more sense to have it consistent with python2 and port the change Martin pointed to. How does one do that? -- ___ Python tracker

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-01-28 Thread Georg Brandl
Georg Brandl added the comment: Hi Julien, thanks for your patch and sorry for the lack of reviews. I find the new wording in the second hunk confusing: ``'store_true'`` and ``'store_false'`` - These store the values ``False`` respectively (Note that these default to ``False`` and ``True``

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-01-28 Thread Julien Baley
Julien Baley added the comment: Hi Georg, thanks for your answer. I think maybe you're missing a bit in there? "``'store_true'`` and ``'store_false'`` - These store the values ``True`` and ``False`` respectively (Note that these default to ``False`` and ``True`` respectively). These are

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-01-27 Thread Julien Baley
Julien Baley added the comment: This issue has now been open for nearly three months. I think my patch is an improvement over the current documentation. If people want to improve the documentation further, they can probably submit a patch for that. What can I do to get this accepted?

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2015-10-06 Thread paul j3
paul j3 added the comment: I have seen questions on StackOverflow with 'store_true' and explicit `default=False` parameters. I don't recall any where this was a problem. Usually it's as harmless as users specifying other defaults like `action='store'`, or a dest that echos a long option,

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2015-10-04 Thread Julien Baley
New submission from Julien Baley: The documentation of the action `store_const` states that it defaults to None. In turn, the documentation of `store_true` and `store_false` states that "[t]hese are special cases of 'store_const'", suggesting that they would also default to None. Thankfully,

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2015-10-04 Thread R. David Murray
R. David Murray added the comment: There is another issue to fix the documentation for store_const, which does not in fact default to anything. The 'default" in this case is the default for the value stored when the option is specified. So if store_true also implies 'default=False', that

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2015-10-04 Thread Julien Baley
Changes by Julien Baley : Removed file: http://bugs.python.org/file40676/store_true_false_doc.patch ___ Python tracker ___

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2015-10-04 Thread Julien Baley
Julien Baley added the comment: That's true, store_const has no default and will throw an exception if const is not provided. Updated the patch consequently. -- Added file: http://bugs.python.org/file40677/store_const_true_false_doc.patch ___ Python