diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2016-10-17 03:14:48 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2016-10-17 03:14:48 (GMT) |
commit | 066b1217af161f30b206e77bffb491e0fa9a4579 (patch) | |
tree | b08ec600b1b4ddf0731183b8501f0eba6069c0b1 /Doc | |
parent | 3aa75528a1eb47b1f3bd5b681bacf9dab27186b9 (diff) | |
parent | 5493e4723a922b9905cf6916363e72109a531cfd (diff) | |
download | cpython-066b1217af161f30b206e77bffb491e0fa9a4579.zip cpython-066b1217af161f30b206e77bffb491e0fa9a4579.tar.gz cpython-066b1217af161f30b206e77bffb491e0fa9a4579.tar.bz2 |
Issue #28455: Merge from 3.5
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/argparse.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index fab0727..879bfed 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -1958,10 +1958,11 @@ Customizing file parsing 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 - as an argument:: + as an argument. The following example demonstrates how to do this:: - def convert_arg_line_to_args(self, arg_line): - return arg_line.split() + class MyArgumentParser(argparse.ArgumentParser): + def convert_arg_line_to_args(self, arg_line): + return arg_line.split() Exiting methods |