[Python-checkins] cpython (merge 3.2 -> default): Issue #13605: merge with 3.2

sandro.tosi python-checkins at python.org
Thu Jan 19 22:26:30 CET 2012


http://hg.python.org/cpython/rev/4c3271527794
changeset: 74531:4c3271527794
parent: 74528:6b4cec0719a3
parent: 74530:d6e53d1f46eb
user: Sandro Tosi <sandro.tosi at gmail.com>
date: Thu Jan 19 22:23:17 2012 +0100
summary:
 Issue #13605: merge with 3.2
files:
 Doc/library/argparse.rst | 10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -859,16 +859,16 @@
 usage: PROG [-h] foo [foo ...]
 PROG: error: too few arguments
 
-* ``argparse.REMAINDER``. All the remaining command-line arguments
- are gathered into a lits. This is commonly useful for command line
- utilities that dispatch to other command line utilities.
+* ``argparse.REMAINDER``. All the remaining command-line arguments are gathered
+ into a list. This is commonly useful for command line utilities that dispatch
+ to other command line utilities.
 
 >>> parser = argparse.ArgumentParser(prog='PROG')
 >>> parser.add_argument('--foo')
 >>> parser.add_argument('command')
 >>> parser.add_argument('args', nargs=argparse.REMAINDER)
- >>> print parser.parse_args('--foo B XX YY ZZ'.split())
- Namespace(args=['YY', 'ZZ'], command='XX', foo='B')
+ >>> print parser.parse_args('--foo B cmd --arg1 XX ZZ'.split())
+ Namespace(args=['--arg1', 'XX', 'ZZ'], command='cmd', foo='B')
 
 If the ``nargs`` keyword argument is not provided, the number of arguments consumed
 is determined by the action_. Generally this means a single command-line argument
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /