[Python-checkins] cpython (merge 3.3 -> default): Revert duplicate changes in argparse docs.

andrew.svetlov python-checkins at python.org
Wed Nov 28 18:26:23 CET 2012


http://hg.python.org/cpython/rev/ddcf09a348ca
changeset:   80626:ddcf09a348ca
parent:      80623:63ff2d421d1a
parent:      80625:814403d824a5
user:        Andrew Svetlov <andrew.svetlov at gmail.com>
date:        Wed Nov 28 19:24:44 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