Message259109
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 special cases of ``'store_const'``." (added "``True`` andd")
But if I'm correct, you're talking of the parenthesis which would be confusing? Can we come up with a better wording?
"(and default to False and True if the action is not triggered)" ?
As for `store_const`, R. David Murray says it has no default. It is technically correct: store_const behaves like any other action in that it defaults to whatever the argument `default` in `add_argument` is set to.
The fact that `default` defaults to None is indicated in 16.4.3.5. default:
"The default keyword argument of add_argument(), whose value defaults to None,"
Therefore, I believe it is more correct the way R. David Murray suggested.
What do you think? |
|
Date |
User |
Action |
Args |
2016-01-28 09:00:20 | Julien Baley | set | recipients:
+ Julien Baley, georg.brandl, r.david.murray, docs@python, paul.j3 |
2016-01-28 09:00:19 | Julien Baley | set | messageid: <1453971619.98.0.369273051909.issue25314@psf.upfronthosting.co.za> |
2016-01-28 09:00:19 | Julien Baley | link | issue25314 messages |
2016-01-28 09:00:19 | Julien Baley | create | |
|