Re: PEP proposal optparse

2008-09-19 Thread Pete Forman
James <[EMAIL PROTECTED]> writes: > I would like to know your thoughts on a proposed change to optparse > that I have planned. It is possible to add default values to > multiple options using the set_defaults. However, when adding > descriptions to options the developer has to specify it in ea

Re: PEP proposal optparse

2008-09-18 Thread James Mills
On Thu, Sep 18, 2008 at 9:02 PM, James Nicolson <[EMAIL PROTECTED]> wrote: > Perhaps it is better to keep descriptions short and store longer > descriptions elsewhere, but there are many programs that have long > descriptions, for example try: ls --help (at least on my machine a lot > of these desc

Re: PEP proposal optparse

2008-09-18 Thread Grant Edwards
On 2008-09-18, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Thu, 18 Sep 2008 11:07:45 -0500, Grant Edwards wrote: > >> While we're making suggestions, I've always wished that the --help >> output displayed the default values for options in addition to the help >> text specified by the u

Re: PEP proposal optparse

2008-09-18 Thread Marc 'BlackJack' Rintsch
On Thu, 18 Sep 2008 11:07:45 -0500, Grant Edwards wrote: > While we're making suggestions, I've always wished that the --help > output displayed the default values for options in addition to the help > text specified by the user. I end up having to enter the default values > twice -- once as a ke

Re: PEP proposal optparse

2008-09-18 Thread Tim Chase
Grant Edwards wrote: While we're making suggestions, I've always wished that the --help output displayed the default values for options in addition to the help text specified by the user. I end up having to enter the default values twice -- once as a keyword argument and again in the help text.

Re: PEP proposal optparse

2008-09-18 Thread Grant Edwards
While we're making suggestions, I've always wished that the --help output displayed the default values for options in addition to the help text specified by the user. I end up having to enter the default values twice -- once as a keyword argument and again in the help text. Then later when I deci

Re: PEP proposal optparse

2008-09-18 Thread Steven D'Aprano
On Thu, 18 Sep 2008 03:37:54 -0700, James wrote: > Hi, > > I would like to know your thoughts on a proposed change to optparse that > I have planned. It is possible to add default values to multiple options > using the set_defaults. However, when adding descriptions to options the > developer has

Re: PEP proposal optparse

2008-09-18 Thread Fredrik Lundh
James Mills wrote: As you can see (as long as you're reading this in fixed-width fonts) it _is_ very readable. given that it only relies on indentation from the left margin, it's no less readable in a proportional font (unless you're using an font with variable-width spaces, that is ;-).

Re: PEP proposal optparse

2008-09-18 Thread James Nicolson
Perhaps it is better to keep descriptions short and store longer descriptions elsewhere, but there are many programs that have long descriptions, for example try: ls --help (at least on my machine a lot of these descriptions are quite long). 2008/9/18 James Mills <[EMAIL PROTECTED]>: > Hi James, >

Re: PEP proposal optparse

2008-09-18 Thread James Mills
Hi James, I can't say I really agree with your proposal. I tend to keep the help descriptions of my options short and concise and to the point. Also, one must use the language's features (indentation) to your advantage, as doing so ensure readability. For example (from my bhimport tool): def p