• A new feature request - parser add_mutually_exclusive_group - add a def

    From =?UTF-8?B?15DXldeo15k=?=@21:1/5 to All on Tue Jul 9 08:13:57 2024
    Hi,

    Please look at this Stack Overflow post: https://stackoverflow.com/questions/78722378/parser-add-mutually-exclusive-group-how-can-i-set-a-default-value

    1. Is there a way to add a default to parser add_mutually_exclusive_group groups - a value that will be set by default? In this case I
    want test-default-languages=True to be set as a default.

    2. I tried to subscribe to Python-ideas [email protected], but I
    can't login to
    https://mail.python.org/mailman3/lists/python-ideas.python.org/. Although I
    did login to https://mail.python.org/mailman/options/python-list . Do I
    have to create a new account?

    Thanks,
    Uri.
    אורי
    [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Ram@21:1/5 to [email protected] on Tue Jul 9 06:12:53 2024
    =?UTF-8?B?15DXldeo15k=?= <[email protected]> wrote or quoted:
    1. Is there a way to add a default to parser add_mutually_exclusive_group >groups - a value that will be set by default? In this case I
    want test-default-languages=True to be set as a default.

    I am not aware of such a possibility. But you could write a function
    to parse the arguments using argparse, then inspect the parsed_args,
    and modify them to reflect your default if no other argument was
    detected. However, I have no experience with using argparse at all,
    so it is well possible that someone who is proficient in argparse
    might actually know how to set a default value there!

    2. I tried to subscribe to Python-ideas [email protected], but I
    can't login to

    It might be necessary to once create an account for the new
    Mailman3 system. As I have no experience with mailing lists
    whatsoever, this is just a wild guess!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to All on Mon Jul 8 23:04:14 2024
    I looked at the linked SO post and it seems to be a feature suggestion
    for the argparse library. Python's bug tracker is currently at:

    https://github.com/python/cpython/issues

    You might want to open an issue there with a concrete proposal.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Barry Scott@21:1/5 to All on Tue Jul 9 16:40:14 2024
    On 9 Jul 2024, at 06:13, ⁨אורי via Python-list⁩ <⁨[email protected]⁩> wrote:

    I tried to subscribe to Python-ideas

    These days ideas are discussed on https://discuss.python.org/
    It is rare to see an idea on the mailing list.

    Barry

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?B?15DXldeo15k=?=@21:1/5 to [email protected] on Wed Jul 10 08:07:07 2024
    Thank you.

    Uri.
    אורי
    [email protected]


    On Tue, Jul 9, 2024 at 6:40 PM Barry Scott <[email protected]> wrote:



    On 9 Jul 2024, at 06:13, ⁨אורי via Python-list⁩ <⁨[email protected]⁩>
    wrote:

    I tried to subscribe to Python-ideas


    These days ideas are discussed on https://discuss.python.org/
    It is rare to see an idea on the mailing list.

    Barry




    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)