Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents adec76a + eff1738 commit 2d6f0c1Copy full SHA for 2d6f0c1
1 file changed
Doc/library/argparse.rst
@@ -1444,21 +1444,6 @@ be achieved by specifying the ``namespace=`` keyword argument::
1444
'BAR'
1445
1446
1447
-Converting the namespace to a dict
1448
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1449
-
1450
-It's possible to convert a namespace to a :class:`dict` by using the built-in
1451
-function :func:`vars` in this fashion::
1452
1453
- args = parser.parse_args()
1454
- argdict = vars(args)
1455
1456
-This makes it easy to introspect the namespace or to pass the command-line
1457
-arguments to a function taking a bunch of keyword arguments::
1458
1459
- somefunction(**vars(parser.parse_args()))
1460
1461
1462
Other utilities
1463
---------------
1464
0 commit comments