Currently, the number of arguments an option can/should have, needs be
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
Log in to post a comment.