[Python-checkins] cpython (3.2): Revert duplicate changes in argparse docs.

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


http://hg.python.org/cpython/rev/c008f070f88a
changeset:   80624:c008f070f88a
branch:      3.2
parent:      80621:bbecbcff0ce4
user:        Andrew Svetlov <andrew.svetlov at gmail.com>
date:        Wed Nov 28 19:23:52 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
@@ -1425,21 +1425,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