[Python-checkins] cpython (3.4): Issue #23356: Simplify convert_arg_line_to_args example.

berker.peksag python-checkins at python.org
Sun Apr 26 11:10:29 CEST 2015


https://hg.python.org/cpython/rev/bd8b99034121
changeset:   95807:bd8b99034121
branch:      3.4
parent:      95804:7df280b311d0
user:        Berker Peksag <berker.peksag at gmail.com>
date:        Sun Apr 26 12:09:54 2015 +0300
summary:
  Issue #23356: Simplify convert_arg_line_to_args example.

Patch by py.user.

files:
  Doc/library/argparse.rst |  5 +----
  1 files changed, 1 insertions(+), 4 deletions(-)


diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -1921,10 +1921,7 @@
    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

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list