Commit eff1738e authored by Andrew Svetlov's avatar Andrew Svetlov

Revert duplicate changes in argparse docs.

parents 51292fff 74120996
...@@ -1444,21 +1444,6 @@ be achieved by specifying the ``namespace=`` keyword argument:: ...@@ -1444,21 +1444,6 @@ be achieved by specifying the ``namespace=`` keyword argument::
'BAR' '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 Other utilities
--------------- ---------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment