[issue33389] argparse redundant help string

2018-05-04 Thread paul j3

paul j3  added the comment:

Also

https://bugs.python.org/issue27303
[argparse] Unify options in help output

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33389] argparse redundant help string

2018-05-04 Thread paul j3

paul j3  added the comment:

https://bugs.python.org/issue29626
Issue with spacing in argparse module while using help

This deals with a extra space that is produced when a blank metavar is used to 
produce a more compact help line

   -s , --service   help text

My answers have links to relevant SO questions.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33389] argparse redundant help string

2018-05-04 Thread paul j3

paul j3  added the comment:

This is normal behavior for argparse.

People have asked before for a more compact display.  I remember suggesting 
changes to the HelpFormatter subclass on Stackoverflow questions, and there's 
probably one or more bug/issues addressing the same issue.

--
nosy: +paul.j3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33389] argparse redundant help string

2018-05-04 Thread Jakub Wilk

Jakub Wilk  added the comment:

GNU programs seem to use this format:

   $ ls --help | grep ',.*=[A-Z]'
 -I, --ignore=PATTERN   do not list implied entries matching shell 
PATTERN
 -T, --tabsize=COLS assume tab stops at each COLS instead of 8
 -w, --width=COLS   set output width to COLS.  0 means no limit

The argparse format is more accurate, but also less practical, especially for 
long variable names.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33389] argparse redundant help string

2018-05-04 Thread Jakub Wilk

Change by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33389] argparse redundant help string

2018-04-29 Thread Stefan Seefeld

New submission from Stefan Seefeld :

I'm using Python's `argparse` module to define optional arguments.
I'm calling the `argparse.add_argument` method to add both short and long 
arguments, but I notice that the generated help message lists some information 
twice. For example:
```
argparse.add_argument('-s', '--service',...)
```
will generate

```
-s SERVICE, --service SERVICE
```
and when I add a `choices` argument, even the choices list is repeated. I think 
it would be more useful to suppress the repetition to produce output such as
```
-s|--service SERVICE ...
```
instead with both the meta var as well as choices etc. printed only once.

--
components: Library (Lib)
messages: 315917
nosy: stefan
priority: normal
severity: normal
status: open
title: argparse redundant help string
type: enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com