[Python-checkins] cpython (merge 3.2 -> 3.3): Revert duplicate changes in argparse docs.
andrew.svetlov
python-checkins at python.org
Wed Nov 28 18:26:21 CET 2012
http://hg.python.org/cpython/rev/814403d824a5
changeset: 80625:814403d824a5
branch: 3.3
parent: 80622:ee4e31845977
parent: 80624:c008f070f88a
user: Andrew Svetlov <andrew.svetlov at gmail.com>
date: Wed Nov 28 19:24:31 2012 +0200
summary:
Revert duplicate changes in argparse docs.
files:
Doc/library/argparse.rst | 15 ---------------
1 files changed, 0 insertions(+), 15 deletions(-)
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -1444,21 +1444,6 @@
'BAR'
-Converting the namespace to a dict
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-It's possible to convert a namespace to a :class:`dict` by using the built-in
-function :func:`vars` in this fashion::
-
- args = parser.parse_args()
- argdict = vars(args)
-
-This makes it easy to introspect the namespace or to pass the command-line
-arguments to a function taking a bunch of keyword arguments::
-
- somefunction(**vars(parser.parse_args()))
-
-
Other utilities
---------------
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list