[issue26181] argparse can't handle positional argument after list (help message is wrong)

2016-01-27 Thread paul j3
paul j3 added the comment: There are 2 issues parsing - how to reserve one or more arguments for use by following 'positionals'. Fixes have been proposed in other bug/issues, but aren't trivial. usage formatting - the stock formatter displays all optionals first, followed by all positionals

[issue26181] argparse can't handle positional argument after list (help message is wrong)

2016-01-26 Thread Martin Panter
Martin Panter added the comment: I think we should discuss this in the existing reports: Issue 9182: Mention the “--” divider in the documentation and usage as a workaround. Perhaps you could mention your proposal to put positional arguments before the options there. Issue 9338: Change the im

[issue26181] argparse can't handle positional argument after list (help message is wrong)

2016-01-23 Thread SilentGhost
Changes by SilentGhost : -- nosy: +bethard versions: +Python 3.5, Python 3.6 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list m

[issue26181] argparse can't handle positional argument after list (help message is wrong)

2016-01-22 Thread Alex
New submission from Alex: This code is meant to take a filename and a list of integers as arguments. The filename is required, the integers are optional: import argparse parser = argparse.ArgumentParser() parser.add_argument('filename') parser.add_argument('-L', metavar='integer', type=int, na