This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.j3
Recipients bmw, docs@python, paul.j3, rhettinger
Date 2020-12-20.19:28:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1608492537.36.0.10805124524.issue42650@roundup.psfhosted.org>
In-reply-to
Content
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).
History
Date User Action Args
2020-12-20 19:28:57paul.j3setrecipients: + paul.j3, rhettinger, docs@python, bmw
2020-12-20 19:28:57paul.j3setmessageid: <1608492537.36.0.10805124524.issue42650@roundup.psfhosted.org>
2020-12-20 19:28:57paul.j3linkissue42650 messages
2020-12-20 19:28:57paul.j3create