On Mon, 28 Sep 2009 06:59:32 am Steven Bethard wrote: > Why aren't getopt and optparse enough? [snip]
As a newbie, I found optparse intimidating because it provided so many features. I expect argparse will be the same, only more so. (Disclaimer: I haven't used argparse, I'm merely making a prediction based on the available functionality.) As it turned out, optparse wasn't anywhere near as difficult to use as I expected it to be, but I suggest that newbies will have the same response to argparse as I had to optparse -- "this looks complicated, I'll just roll my own". At least I had the option to use getopt. Not every module needs to be newbie-friendly, but something as fundamental as argument parsing should at least provide a gentle learning curve. Currently, getopt more-or-less plays the role of "bare-bones" command line parsing, which I think is important. Assuming argparse is added to the std lib, I'm -0.5 on deprecating getopt, 0 on deprecating optparse. -- Steven D'Aprano _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com