This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author falu2010
Recipients falu2010, paul.j3
Date 2017-02-27.22:44:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAAdFTmStDi2JEj7KPVeomrM_c_bJAzhzAQKioDyBjMbS4DbT+w@mail.gmail.com>
In-reply-to <1488235161.88.0.246740229246.issue29626@psf.upfronthosting.co.za>
Content
There is an extra spacing here if you look carefully. I have commented
above the code. Similarly it happens for "-o" too but not for other
alphabets.

1427:~/mypy/argdev$ python3 issue29626.py delete -h
usage: cli delete [-h] [-p] userid

Deletes a user in your organization.

positional arguments:
  userid             The userid of user.

optional arguments:
  -h, --help         show this help message and exit
// extra space after p and ",".
  -p , --projectid   Specify the project ID of project from where you want
to
                     delete the user or else user will be deleted from
                     organization.

I saw this issue as I use argparse for my CLI usecase which has nested
commands.

On Mon, Feb 27, 2017 at 2:39 PM, paul j3 <report@bugs.python.org> wrote:

>
> paul j3 added the comment:
>
> This help looks normal:
>
> 1427:~/mypy/argdev$ python3 issue29626.py delete -h
> usage: cli delete [-h] [-p] userid
>
> Deletes a user in your organization.
>
> positional arguments:
>   userid             The userid of user.
>
> optional arguments:
>   -h, --help         show this help message and exit
>   -p , --projectid   Specify the project ID of project from where you want
> to
>                      delete the user or else user will be deleted from
>                      organization.
>
> So does this help for the nested subparser:
>
> 1430:~/mypy/argdev$ python3 issue29626.py nodes list -h
> usage: cli nodes list [-h] [-p] [-o]
>
> Lists nodes in your current project
>
> optional arguments:
>   -h, --help       show this help message and exit
>   -p, --projectid
>   -o, --org        (For administrators only) Lists all the nodes in
>
> This double layered subparsers is not common, and might not even be
> included in the unittest file.  But provided you don't try anything too
> tricky it does work.  I've seen a few questions along this line on
> StackOverflow.
>
> Note that the help line for '-p' in the second case is empty because you
> did not specify any help string (as you did for 'delete').
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue29626>
> _______________________________________
>
History
Date User Action Args
2017-02-27 22:44:31falu2010setrecipients: + falu2010, paul.j3
2017-02-27 22:44:31falu2010linkissue29626 messages
2017-02-27 22:44:31falu2010create