@@ -2013,12 +2013,15 @@ Partial parsing
2013
2013
2014
2014
..method ::ArgumentParser.parse_known_args(args=None, namespace=None)
2015
2015
2016
- Sometimes a script may only parse a few of the command-line arguments, passing
2017
- the remaining arguments on to another script or program. In these cases, the
2018
- :meth: `~ArgumentParser.parse_known_args ` method can be useful. It works much like
2019
- :meth: `~ArgumentParser.parse_args ` except that it does not produce an error when
2020
- extra arguments are present. Instead, it returns a two item tuple containing
2021
- the populated namespace and the list of remaining argument strings.
2016
+ Sometimes a script only needs to handle a specific set of command-line
2017
+ arguments, leaving any unrecognized arguments for another script or program.
2018
+ In these cases, the:meth: `~ArgumentParser.parse_known_args ` method can be
2019
+ useful.
2020
+
2021
+ This method works similarly to:meth: `~ArgumentParser.parse_args `, but it does
2022
+ not raise an error for extra, unrecognized arguments. Instead, it parses the
2023
+ known arguments and returns a two item tuple that contains the populated
2024
+ namespace and the list of any unrecognized arguments.
2022
2025
2023
2026
::
2024
2027