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

Skip to content

Commit a7edf1e

Browse files
committed
Issue #23356: Simplify convert_arg_line_to_args example.
Patch by py.user.
2 parents f789465 + 8c99a6d commit a7edf1e

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
@@ -1948,10 +1948,7 @@ Customizing file parsing
19481948
as an argument::
19491949

19501950
def convert_arg_line_to_args(self, arg_line):
1951-
for arg in arg_line.split():
1952-
if not arg.strip():
1953-
continue
1954-
yield arg
1951+
return arg_line.split()
19551952

19561953

19571954
Exiting methods

0 commit comments

Comments
 (0)