New submission from Thomas Nabelek :
>From https://www.python.org/dev/peps/pep-0498/#escape-sequences:
"Backslashes may not appear inside the expression portions of f-strings"
Is this supposed to be true even for arguments to functions inside of the
expression?
my_str = &quo
Thomas Nabelek added the comment:
For anyone else, here is my implementation. I decided not to do anything to
support comments on the same lines as arguments.
import argparse
import re
# Override argparse's convert_arg_line_to_args method to allow for comments and
empty lines
Thomas Nabelek added the comment:
Oh, yes, returning [] does work. Thanks guys.
--
___
Python tracker
<https://bugs.python.org/issue42677>
___
___
Python-bug
Thomas Nabelek added the comment:
While overloading convert_arg_line_to_args may work, I think that @file reading
is kind of the odd ball out in not recognizing '#' as the beginning of a
comment.
Besides, I'm not sure that overloading just convert_arg_line_to_args is
suff
New submission from Thomas Nabelek :
For input argument files, specified with the fromfile_prefix_chars argument to
argparse.ArgumentParser, argparse should ignore lines beginning with '#' so
that comments can be used in those files.
--
components: Library (Lib)
messages: 3