[issue31012] suggestion: allow termination argument in argparse to be specified as argument

2017-08-03 Thread paul j3
paul j3 added the comment: The earlier issue for '--' as arguement http://bugs.python.org/issue14364 With the patch I suggested there '-f--' and '--foo=--' work as arguments. '--foo --' is still interpreted as a positionals switch. In optparse parsing, a flagged option gets all the remaining

[issue31012] suggestion: allow termination argument in argparse to be specified as argument

2017-08-03 Thread Leon Avery
Leon Avery added the comment: The POSIX guideline suggests that -- should be available as an option argument. One should be able to say "command --opt --" in order to make '--' the value of the '--opt' option. > There are some known problems with this '--', specially when there are more > th

[issue31012] suggestion: allow termination argument in argparse to be specified as argument

2017-08-01 Thread paul j3
paul j3 added the comment: argparse roughly follows POSIX practice: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html Guideline 10: The first -- argument that is not an option-argument should be accepted as a delimiter indicating the end of options. Any f

[issue31012] suggestion: allow termination argument in argparse to be specified as argument

2017-07-30 Thread paul j3
Changes by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/

[issue31012] suggestion: allow termination argument in argparse to be specified as argument

2017-07-24 Thread Steven D'Aprano
Steven D'Aprano added the comment: > This means that a user who wishes to use '--' in some other way is out of > luck. I think that's a feature, not a limitation. Command line arguments should use broadly consistent conventions. I don't want one program to use '--' for "end of options" and a

[issue31012] suggestion: allow termination argument in argparse to be specified as argument

2017-07-24 Thread Leon Avery
New submission from Leon Avery: In the argparse module, the argument '--' is interpreted as a signal that everything after it is a positional argument. '--' is literally written into the argparse code, in _parse_known_args. This means that a user who wishes to use '--' in some other way is out