mirror of
https://github.com/python/cpython.git
synced 2025-10-02 13:22:19 +00:00
Issue #28455: Merge from 3.6
This commit is contained in:
commit
83903bb8cc
1 changed files with 4 additions and 3 deletions
|
@ -1958,10 +1958,11 @@ Customizing file parsing
|
||||||
The method is called once per line read from the argument file, in order.
|
The method is called once per line read from the argument file, in order.
|
||||||
|
|
||||||
A useful override of this method is one that treats each space-separated word
|
A useful override of this method is one that treats each space-separated word
|
||||||
as an argument::
|
as an argument. The following example demonstrates how to do this::
|
||||||
|
|
||||||
def convert_arg_line_to_args(self, arg_line):
|
class MyArgumentParser(argparse.ArgumentParser):
|
||||||
return arg_line.split()
|
def convert_arg_line_to_args(self, arg_line):
|
||||||
|
return arg_line.split()
|
||||||
|
|
||||||
|
|
||||||
Exiting methods
|
Exiting methods
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue