Message383546
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! |
|
Date |
User |
Action |
Args |
2020-12-21 18:09:21 | bmw | set | recipients:
+ bmw, rhettinger, docs@python, paul.j3 |
2020-12-21 18:09:21 | bmw | set | messageid: <1608574161.98.0.0793352821044.issue42650@roundup.psfhosted.org> |
2020-12-21 18:09:21 | bmw | link | issue42650 messages |
2020-12-21 18:09:21 | bmw | create | |
|