From 74120996f54b53c26b0682406647a2f8bdf53e8b Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Wed, 28 Nov 2012 19:23:52 +0200 Subject: [PATCH] Revert duplicate changes in argparse docs. --- Doc/library/argparse.rst | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index b10df390e7a..5273e9b12c4 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -1425,21 +1425,6 @@ be achieved by specifying the ``namespace=`` keyword argument:: '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 ---------------