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 1ff50df + 5e0c571 commit 3288e94Copy full SHA for 3288e94
1 file changed
Doc/library/argparse.rst
@@ -1852,9 +1852,10 @@ A partial upgrade path from :mod:`optparse` to :mod:`argparse`:
1852
* Replace all :meth:`optparse.OptionParser.add_option` calls with
1853
:meth:`ArgumentParser.add_argument` calls.
1854
1855
-* Replace ``options, args = parser.parse_args()`` with ``args =
+* Replace ``(options, args) = parser.parse_args()`` with ``args =
1856
parser.parse_args()`` and add additional :meth:`ArgumentParser.add_argument`
1857
- calls for the positional arguments.
+ calls for the positional arguments. Keep in mind that what was previously
1858
+ called ``options``, now in :mod:`argparse` context is called ``args``.
1859
1860
* Replace callback actions and the ``callback_*`` keyword arguments with
1861
``type`` or ``action`` arguments.
0 commit comments