Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8c99a6d

Browse files
committed
Issue #23356: Simplify convert_arg_line_to_args example.
Patch by py.user.
1 parent f968177 commit 8c99a6d

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

Doc/library/argparse.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1921,10 +1921,7 @@ Customizing file parsing
19211921
as an argument::
19221922

19231923
def convert_arg_line_to_args(self, arg_line):
1924-
for arg in arg_line.split():
1925-
if not arg.strip():
1926-
continue
1927-
yield arg
1924+
return arg_line.split()
19281925

19291926

19301927
Exiting methods

0 commit comments

Comments
 (0)