[issue41359] argparse mutually exclusive group does not exclude in some cases

2020-07-21 Thread paul j3
paul j3 added the comment: This is the result of how default values are handled with '?' (and '*') nargs. At the start of nested `take_action` function (which handles all actions) is this code: argument_values = self._get_values(action, argument_strings) # error if

[issue41359] argparse mutually exclusive group does not exclude in some cases

2020-07-21 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +paul.j3, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41359] argparse mutually exclusive group does not exclude in some cases

2020-07-21 Thread Krzysiek
New submission from Krzysiek : The documentation for `ArgumentParser.add_mutually_exclusive_group` states: "argparse will make sure that only one of the arguments in the mutually exclusive group was present on the command line". This is not the case in certain circumstances: ```python