[issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group

2020-10-17 Thread paul j3
paul j3 added the comment: A more recent issue shows that the use of a '*' positional in a multually_exclusive_group is poorly understood and documented. https://bugs.python.org/issue41854 That's part of why I am not enthusiastic about extending this to include REMAINDER. And on

[issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group

2020-10-17 Thread Tal Einat
Tal Einat added the comment: I suggest bringing this up for discussion on Python-Ideas. -- nosy: +taleinat ___ Python tracker ___

[issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group

2020-05-19 Thread Shani Armon
Shani Armon added the comment: Bumping, since no reply was made to my previous comment. If this is not relevant at all can this be closed or marked as such, so that it may be raised in python-dev? -- ___ Python tracker

[issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group

2020-05-07 Thread Shani Armon
Shani Armon added the comment: Also, this is quite different from previous issues with REMAINDER. This fits in line with how the example suggests remainder should be used. I wand some flags (version, configuration) to be separate and exclusive to subcommands. And the usage is not ambiguous.

[issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group

2020-05-06 Thread Shani Armon
Shani Armon added the comment: Yes. The pull request contains the special handling. For the purpose of REMAINDER positionals, the default is changed to the empty list that was returned if no arguments were passed. For the purpose of positional argument, that is equivalent to nothing being

[issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group

2020-05-06 Thread paul j3
paul j3 added the comment: A flagged argument with REMAINDER works just fine in a mutually exclusive group. group.add_argument('-g', nargs='...') positionals in such a group can only have ? or *. If you check the code, and past issues you'll see that those require some special handling.

[issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group

2020-05-05 Thread Shani Armon
Shani Armon added the comment: Why is REMAINDER any more complicated than ZERO_OR_MORE? I need to make a subcommand system (think jupyter style) and -- isn't an intuitive interface. Jupyter just doesn't use argparse in the subcommand case. I prever to in order to support options given

[issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group

2020-05-05 Thread paul j3
paul j3 added the comment: Handling the positional with '?' and '*' in a mutually_exclusive_group is tricky enough! I believe your user can use the '--' to get the same effect. -- ___ Python tracker

[issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group

2020-05-05 Thread paul j3
Change by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group

2020-05-05 Thread Shani Armon
Change by Shani Armon : -- keywords: +patch pull_requests: +19233 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19919 ___ Python tracker ___

[issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group

2020-05-05 Thread Shani Armon
New submission from Shani Armon : Options specified with the REMAINDER nargs should be treated as optional. And an empty list should be treated as default. -- components: Library (Lib) messages: 368126 nosy: Shani Armon, rhettinger priority: normal severity: normal status: open title: