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 d6d49f1 + 066b121 commit 83903bbCopy full SHA for 83903bb
1 file changed
Doc/library/argparse.rst
@@ -1958,10 +1958,11 @@ Customizing file parsing
1958
The method is called once per line read from the argument file, in order.
1959
1960
A useful override of this method is one that treats each space-separated word
1961
- as an argument::
+ as an argument. The following example demonstrates how to do this::
1962
1963
- def convert_arg_line_to_args(self, arg_line):
1964
- return arg_line.split()
+ class MyArgumentParser(argparse.ArgumentParser):
+ def convert_arg_line_to_args(self, arg_line):
1965
+ return arg_line.split()
1966
1967
1968
Exiting methods
0 commit comments