summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2015-04-26 09:10:27 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2015-04-26 09:10:27 (GMT)
commita7edf1e57cfae67e5734457be812cdd55a32a062 (patch)
treef3b127c8ffa752842c997eece1ea693ffe031767 /Doc
parentf789465eed2d9127fb60baad6f19f18714a604cc (diff)
parent8c99a6d6049b87b328073189719d9cc4bfc68b82 (diff)
downloadcpython-a7edf1e57cfae67e5734457be812cdd55a32a062.zip
cpython-a7edf1e57cfae67e5734457be812cdd55a32a062.tar.gz
cpython-a7edf1e57cfae67e5734457be812cdd55a32a062.tar.bz2
Issue #23356: Simplify convert_arg_line_to_args example.
Patch by py.user.
Diffstat (limited to 'Doc')
-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 24060f0..72095a8 100644
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -1948,10 +1948,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