summaryrefslogtreecommitdiffstats
path: root/Doc/library/argparse.rst
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2015-04-26 09:09:54 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2015-04-26 09:09:54 (GMT)
commit8c99a6d6049b87b328073189719d9cc4bfc68b82 (patch)
tree311f5d9a714a2325e68abe7947b97138c6437626 /Doc/library/argparse.rst
parentf9681776c97757540200b6a0261c89c57c94f580 (diff)
downloadcpython-8c99a6d6049b87b328073189719d9cc4bfc68b82.zip
cpython-8c99a6d6049b87b328073189719d9cc4bfc68b82.tar.gz
cpython-8c99a6d6049b87b328073189719d9cc4bfc68b82.tar.bz2
Issue #23356: Simplify convert_arg_line_to_args example.
Patch by py.user.
Diffstat (limited to 'Doc/library/argparse.rst')
-rw-r--r--Doc/library/argparse.rst5
1 files changed, 1 insertions, 4 deletions
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
index 73f9480..ebf88fa 100644
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -1921,10 +1921,7 @@ Customizing file parsing
as an argument::
def convert_arg_line_to_args(self, arg_line):
- for arg in arg_line.split():
- if not arg.strip():
- continue
- yield arg
+ return arg_line.split()
Exiting methods