[issue13605] document argparse's nargs=REMAINDER

2012-02-20 Thread Georg Brandl
Georg Brandl added the comment: Yes, that's correct. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue13605] document argparse's nargs=REMAINDER

2012-02-20 Thread Éric Araujo
Éric Araujo added the comment: > Blocks not introduced by "::" are *NOT* code blocks. > If they happen to begin with ">>> ", they are recognized as doctest blocks > and colorized as doctests. Ah, that’s it! Thanks. So we have two valid ways of marking up doctest-like blocks, “::” ° indent an

[issue13605] document argparse's nargs=REMAINDER

2012-02-20 Thread Tshepang Lekhonkhobe
Tshepang Lekhonkhobe added the comment: (this is only concerning the latest commit) Not sure if I should open a new issue, but why is there a print function at all, given that: >>> print(parser.parse_args('--foo B cmd --arg1 XX ZZ'.split())) Namespace(args=['--arg1', 'XX', 'ZZ'], command='cmd

[issue13605] document argparse's nargs=REMAINDER

2012-02-20 Thread Georg Brandl
Georg Brandl added the comment: Blocks not introduced by "::" are *NOT* code blocks. If they happen to begin with ">>> ", they are recognized as doctest blocks and colorized as doctests. Doctest blocks shouldn't be indented. (The indent is a blockquote in this case.) -- nosy: +georg.

[issue13605] document argparse's nargs=REMAINDER

2012-02-19 Thread Sandro Tosi
Sandro Tosi added the comment: On Mon, Feb 20, 2012 at 01:52, Éric Araujo wrote: > I’m not entirely sure they are needed (Python code blocks seem to be > autodetected and show up colorized too), but I did it for consistency (and to > make my editor detect them). Yeah, I refrained to add them

[issue13605] document argparse's nargs=REMAINDER

2012-02-19 Thread Éric Araujo
Éric Araujo added the comment: I have added the missing “::” before code blocks (one was added by the patch you committed, others were already here). I’m not entirely sure they are needed (Python code blocks seem to be autodetected and show up colorized too), but I did it for consistency (and

[issue13605] document argparse's nargs=REMAINDER

2012-02-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 996efb0425c5 by Sandro Tosi in branch '3.2': Issue #13605: use print() in argparse nargs example http://hg.python.org/cpython/rev/996efb0425c5 New changeset c3daa6a834c6 by Sandro Tosi in branch 'default': Issue #13605: merge with 3.2 http://hg.pyt

[issue13605] document argparse's nargs=REMAINDER

2012-02-03 Thread Éric Araujo
Éric Araujo added the comment: It would be best if the 3.x docs did not use a print statement . The code block should also be preceded by ::. -- nosy: +eric.araujo ___ Python tracker

[issue13605] document argparse's nargs=REMAINDER

2012-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1b481e76cd16 by Sandro Tosi in branch '2.7': Issue #13605: more meaningful example + fixes http://hg.python.org/cpython/rev/1b481e76cd16 New changeset d6e53d1f46eb by Sandro Tosi in branch '3.2': Issue #13605: more meaningful example + fixes http:/

[issue13605] document argparse's nargs=REMAINDER

2012-01-19 Thread Sandro Tosi
Changes by Sandro Tosi : -- nosy: +sandro.tosi resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.2 ___ Python tracker

[issue13605] document argparse's nargs=REMAINDER

2012-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 35665f6f3674 by Sandro Tosi in branch '2.7': Issue #13605: add documentation for nargs=argparse.REMAINDER http://hg.python.org/cpython/rev/35665f6f3674 New changeset 6f3d55f5a31e by Sandro Tosi in branch '3.2': Issue #13605: add documentation for n

[issue13605] document argparse's nargs=REMAINDER

2011-12-15 Thread Steven Bethard
New submission from Steven Bethard : There is an undocumented value for add_argument's nargs parameter, REMAINDER, which can be used to consume all the remaining arguments. This is commonly useful for command line utilities that dispatch to other command line utilities. Though undocumented, it