changeset: 80625:814403d824a5 branch: 3.3 parent: 80622:ee4e31845977 parent: 80624:c008f070f88a user: Andrew Svetlov date: Wed Nov 28 19:24:31 2012 +0200 files: Doc/library/argparse.rst description: Revert duplicate changes in argparse docs. diff -r ee4e31845977 -r 814403d824a5 Doc/library/argparse.rst --- a/Doc/library/argparse.rst Wed Nov 28 19:18:09 2012 +0200 +++ b/Doc/library/argparse.rst Wed Nov 28 19:24:31 2012 +0200 @@ -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 ---------------