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 bmw
Recipients bmw, docs@python, paul.j3, rhettinger
Date 2020-12-21.18:09:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1608574161.98.0.0793352821044.issue42650@roundup.psfhosted.org>
In-reply-to
Content
Thanks for the help! I was mistaken here.

The behavior I want is to not add the option to the namespace regardless of whether or not the user set it. I was initially under the impression that dest=SUPPRESS caused this behavior, however, it seems to have the same behavior as default=SUPPRESS due to the code at https://github.com/python/cpython/blob/711381dfb09fbd434cc3b404656f7fd306161a64/Lib/argparse.py#L1838-L1841. By using default=SUPPRESS which is documented and a custom __call__ method on an Action class, I can get the behavior I want so I'm closing this issue.

Thanks again and sorry for the noise!
History
Date User Action Args
2020-12-21 18:09:21bmwsetrecipients: + bmw, rhettinger, docs@python, paul.j3
2020-12-21 18:09:21bmwsetmessageid: <1608574161.98.0.0793352821044.issue42650@roundup.psfhosted.org>
2020-12-21 18:09:21bmwlinkissue42650 messages
2020-12-21 18:09:21bmwcreate