[issue10772] Several actions for argparse arguments missing from docs
New submission from ipatrol <ipatrol6010@yahoo.com>: I actually noticed this while trying to free the -h option for my program. The actions not mentioned are count, help, and parsers. Also for nargs, '...' and 'A...' are not documented either in the Sphinx docs or the leading docstring for the Action class. ---------- assignee: docs@python components: Documentation, Library (Lib) messages: 124654 nosy: docs@python, ipatrol priority: normal severity: normal status: open title: Several actions for argparse arguments missing from docs type: behavior versions: Python 2.7, Python 3.3 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue10772> _______________________________________
Changes by Terry J. Reedy <tjreedy@udel.edu>: ---------- nosy: +bethard versions: +Python 3.2 -Python 3.3 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue10772> _______________________________________
Steven Bethard <steven.bethard@gmail.com> added the comment: action="help" definitely needs to be documented action="count" probably should be, though I think it's pretty useless (I just copied it from optparse) action="parsers", nargs="..." and nargs="A..." I'm not so sure about. These are currently kind of implementation details. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue10772> _______________________________________
Changes by Éric Araujo <merwok@netwok.org>: ---------- keywords: +easy nosy: +eric.araujo stage: -> needs patch versions: +Python 3.3 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue10772> _______________________________________
Marc Sibson <sibson@gmail.com> added the comment: issue10772.patch: add help, count and parsers to Doc/library/argparse.rst ---------- keywords: +patch nosy: +marcs Added file: http://bugs.python.org/file22179/issue10772.patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue10772> _______________________________________
Éric Araujo <merwok@netwok.org> added the comment: I would not document 'parsers'. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue10772> _______________________________________
Marc Sibson <sibson@gmail.com> added the comment: issue10772.patch2: document help and count actions in Doc/library/argparse.rst ---------- Added file: http://bugs.python.org/file22198/issue10772.patch2 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue10772> _______________________________________
Changes by Sandro Tosi <sandro.tosi@gmail.com>: ---------- nosy: +sandro.tosi _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue10772> _______________________________________
ipatrol <ipatrol6010@yahoo.com> added the comment: The patch has been submitted, now we just need to apply it and update the online docs accordingly. ---------- status: open -> pending versions: +Python 3.4 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue10772> _______________________________________
Changes by Brian Curtin <brian@python.org>: ---------- status: pending -> open versions: -Python 3.4 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue10772> _______________________________________
Changes by Ezio Melotti <ezio.melotti@gmail.com>: ---------- stage: needs patch -> patch review _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue10772> _______________________________________
Éric Araujo <merwok@netwok.org> added the comment: Ezio made further comments, follow the “review” link. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue10772> _______________________________________
Marc Sibson <sibson@gmail.com> added the comment: changes as per the review, ---------- Added file: http://bugs.python.org/file23713/issue10772.patch3 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue10772> _______________________________________
Éric Araujo <merwok@netwok.org> added the comment: Looks good to me. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue10772> _______________________________________
Changes by Ezio Melotti <ezio.melotti@gmail.com>: ---------- stage: patch review -> commit review _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue10772> _______________________________________
Steven Bethard <steven.bethard@gmail.com> added the comment: Looks good to me too. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue10772> _______________________________________
Roundup Robot <devnull@psf.upfronthosting.co.za> added the comment: New changeset 278fbd7b9608 by Sandro Tosi in branch '2.7': Issue #10772: add count and help argparse action; patch by Marc Sibson http://hg.python.org/cpython/rev/278fbd7b9608 New changeset 326f755962e3 by Sandro Tosi in branch '3.2': Issue #10772: add count and help argparse action; patch by Marc Sibson http://hg.python.org/cpython/rev/326f755962e3 ---------- nosy: +python-dev _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue10772> _______________________________________
Sandro Tosi <sandro.tosi@gmail.com> added the comment: Thanks Marc for the patch, I've just committed it. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue10772> _______________________________________
participants (9)
-
Brian Curtin
-
Ezio Melotti
-
ipatrol
-
Marc Sibson
-
Roundup Robot
-
Sandro Tosi
-
Steven Bethard
-
Terry J. Reedy
-
Éric Araujo