File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -2013,12 +2013,15 @@ Partial parsing
20132013
20142014.. method :: ArgumentParser.parse_known_args(args=None, namespace=None)
20152015
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.
20222025
20232026 ::
20242027
You can’t perform that action at this time.
0 commit comments