#25 optparse should support arbitrary number of arguments

open
nobody
None
5
2007-03-16
2007-03-16
No

Currently, the number of arguments an option can/should have, needs be
defined.

This is done using "nagrs".

parser.add_option("", "--my-option", nargs=3)

The problem is that at times it isn't predictable how
many arguments you'll be receiving.

I request the implementation of this feature in
optparse, where the following could be possible.

parser.add_option("", "--my-option", nargs=*)

Note: There has been a bug filed for this in the Python bugzilla #1527705

Thanks,
Ritesh

Discussion


Log in to post a comment.