Brad Warren <bradmwar...@gmail.com> added the comment:

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!

----------
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42650>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to