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 @@ -2122,12 +2122,15 @@ Partial parsing
21222122
21232123.. method :: ArgumentParser.parse_known_args(args=None, namespace=None)
21242124
2125- Sometimes a script may only parse a few of the command-line arguments, passing
2126- the remaining arguments on to another script or program. In these cases, the
2127- :meth: `~ArgumentParser.parse_known_args ` method can be useful. It works much like
2128- :meth: `~ArgumentParser.parse_args ` except that it does not produce an error when
2129- extra arguments are present. Instead, it returns a two item tuple containing
2130- the populated namespace and the list of remaining argument strings.
2125+ Sometimes a script only needs to handle a specific set of command-line
2126+ arguments, leaving any unrecognized arguments for another script or program.
2127+ In these cases, the :meth: `~ArgumentParser.parse_known_args ` method can be
2128+ useful.
2129+
2130+ This method works similarly to :meth: `~ArgumentParser.parse_args `, but it does
2131+ not raise an error for extra, unrecognized arguments. Instead, it parses the
2132+ known arguments and returns a two item tuple that contains the populated
2133+ namespace and the list of any unrecognized arguments.
21312134
21322135 ::
21332136
You can’t perform that action at this time.
0 commit comments