suggestion for optparse

N

Neal D. Becker

optparse is great. I have one small suggestion for an improvement.
optparse supports boolean switches, with action=store_false/store_true. It
would be handy if one specification would automatically add both positive
and negative forms.

For example:

parser.add_option ("", "--limit", action="store_toggle", dest="doLimit",
default=True)

might add both

--limit

and

--no-limit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,206
Messages
2,571,069
Members
47,677
Latest member
MoisesKoeh

Latest Threads

Top