Re: Current thinking on required options

2021-04-20 Thread Loris Bennett
Roel Schroeven writes: > Avi Gross via Python-list schreef op 20/04/2021 om 1:56: >> Sidestepping the wording of "options" is the very real fact that providing >> names for even required parts can be helpful in many cases. > > Very true. It's very much like named arguments in Python function

Re: Current thinking on required options

2021-04-20 Thread Roel Schroeven
Avi Gross via Python-list schreef op 20/04/2021 om 1:56: Sidestepping the wording of "options" is the very real fact that providing names for even required parts can be helpful in many cases. Very true. It's very much like named arguments in Python function calls: they help to document

RE: Current thinking on required options

2021-04-19 Thread Avi Gross via Python-list
on-list On Behalf Of Dan Stromberg Sent: Monday, April 19, 2021 12:04 PM To: Loris Bennett Cc: Python List Subject: Re: Current thinking on required options On Mon, Apr 19, 2021 at 2:55 AM Loris Bennett wrote: > However, the options -o, -u, and -g are required, not optional. > > The docu

Re: Current thinking on required options

2021-04-19 Thread Dan Stromberg
On Mon, Apr 19, 2021 at 12:36 PM Grant Edwards wrote: > On 2021-04-19, Dan Stromberg wrote: > > On Mon, Apr 19, 2021 at 2:55 AM Loris Bennett < > loris.benn...@fu-berlin.de> wrote: > > > >> However, the options -o, -u, and -g are required, not optional. > >> > >> The documentation > >> > >>

Re: Current thinking on required options

2021-04-19 Thread Grant Edwards
On 2021-04-19, Dan Stromberg wrote: > On Mon, Apr 19, 2021 at 2:55 AM Loris Bennett > wrote: > >> However, the options -o, -u, and -g are required, not optional. >> >> The documentation >> >> https://docs.python.org/3/library/argparse.html#required >> >> advises against required options and

Re: Current thinking on required options

2021-04-19 Thread Chris Angelico
On Tue, Apr 20, 2021 at 4:18 AM Bill Campbell wrote: > > On Mon, Apr 19, 2021, Loris Bennett wrote: > >Hi, > > > >I have various small programs which tend to have an interface like the > >following example: > > > > usage: grocli [-h] [-o {check,add,delete}] [-u USERS [USERS ...]] [-g > > GROUP]

Re: Current thinking on required options

2021-04-19 Thread Bill Campbell
On Mon, Apr 19, 2021, Loris Bennett wrote: >Hi, > >I have various small programs which tend to have an interface like the >following example: > > usage: grocli [-h] [-o {check,add,delete}] [-u USERS [USERS ...]] [-g GROUP] I would do this with the action is first argument. Usage: grocli

Re: Current thinking on required options

2021-04-19 Thread Peter J. Holzer
On 2021-04-19 16:38:24 -, Jon Ribbens via Python-list wrote: > On 2021-04-19, Paul Bryan wrote: > > Calling them options—when they're required—seems like a problem.  > > The option is what the value is, not whether there is a value at all. > If you order a coffee then you may have an option

Re: Current thinking on required options

2021-04-19 Thread Jon Ribbens via Python-list
On 2021-04-19, Paul Bryan wrote: > Calling them options—when they're required—seems like a problem.  The option is what the value is, not whether there is a value at all. If you order a coffee then you may have an option as to what temperature it is, that doesn't mean the coffee having a

Re: Current thinking on required options

2021-04-19 Thread Dan Stromberg
I guess maybe it seems like a problem to someone who hasn't used command line tools much, based solely on a simplistic interpretation of the terminology. But strictly speaking, they're "command line options", or better "command line arguments", not "options". On Mon, Apr 19, 2021 at 9:30 AM Paul

Re: Current thinking on required options

2021-04-19 Thread Paul Bryan
Calling them options—when they're required—seems like a problem.  On Mon, 2021-04-19 at 09:04 -0700, Dan Stromberg wrote: > On Mon, Apr 19, 2021 at 2:55 AM Loris Bennett > > wrote: > > > However, the options -o, -u, and -g are required, not optional. > > > > The documentation > > > >  

Re: Current thinking on required options

2021-04-19 Thread Dan Stromberg
On Mon, Apr 19, 2021 at 2:55 AM Loris Bennett wrote: > However, the options -o, -u, and -g are required, not optional. > > The documentation > > https://docs.python.org/3/library/argparse.html#required > > advises against required options and here > > >

Re: Current thinking on required options

2021-04-19 Thread Barry
> On 19 Apr 2021, at 10:57, Loris Bennett wrote: > > Hi, > > I have various small programs which tend to have an interface like the > following example: > > usage: grocli [-h] [-o {check,add,delete}] [-u USERS [USERS ...]] [-g GROUP] > > Command line grouper tool > > optional

Re: Current thinking on required options

2021-04-19 Thread Loris Bennett
Gisle Vanem writes: > Loris Bennett wrote: > >>usage: grocli [-h] [-o {check,add,delete}] [-u USERS [USERS ...]] [-g >> GROUP] >> >>Command line grouper tool >> >>optional arguments: >> -h, --helpshow this help message and exit >> -o {check,add,delete},

Re: Current thinking on required options

2021-04-19 Thread Peter Otten
On 19/04/2021 11:52, Loris Bennett wrote: Hi, I have various small programs which tend to have an interface like the following example: usage: grocli [-h] [-o {check,add,delete}] [-u USERS [USERS ...]] [-g GROUP] Command line grouper tool optional arguments: -h, --help

Re: Current thinking on required options

2021-04-19 Thread Gisle Vanem
Loris Bennett wrote: usage: grocli [-h] [-o {check,add,delete}] [-u USERS [USERS ...]] [-g GROUP] Command line grouper tool optional arguments: -h, --helpshow this help message and exit -o {check,add,delete}, --operation {check,add,delete}