Message383442
I'd have to study the code (and docs), but I'm not sure setting the `dest` to 'SUPPRESS' does anything meaningful.
default=argparse.SUPPRESS
is useful, keeping the default out of the namespace. That argument appears only if the user has used the option.
But with `dest` (in a default 'store'), I get a namespace like
Namespace(**{'==SUPPRESS==': 'foo'})
'help' and 'version' exit right after displaying their message, so I'm no sure the 'SUPPRESS' is doing anything. The parser doesn't return a namespace.
It appears that the 'dest' is passed to the Action. A custom Action could act on that 'dest'. The default 'store' just uses it as the attribute for storing the value in the namespace.
Anyways, this is not the kind of thing that we'll be tweaking in the source. I don't recall any bug/issue touching on this behavior (but we could do a search). |
|
Date |
User |
Action |
Args |
2020-12-20 19:28:57 | paul.j3 | set | recipients:
+ paul.j3, rhettinger, docs@python, bmw |
2020-12-20 19:28:57 | paul.j3 | set | messageid: <1608492537.36.0.10805124524.issue42650@roundup.psfhosted.org> |
2020-12-20 19:28:57 | paul.j3 | link | issue42650 messages |
2020-12-20 19:28:57 | paul.j3 | create | |
|