[stdlib-sig] should we try to add argparse?

Laura Creighton lac at openend.se
Fri Sep 11 06:48:21 CEST 2009


In a message of Thu, 10 Sep 2009 19:55:42 -0300, Collin Winter writes:
>Honest question, having only read the docs about argparse: would it be
>possible to merge the functionality of argparse into optparse and so
>preserve a greater measure of backwards compatibility? Some of the
>stuff I'm reading about in
>http://argparse.googlecode.com/svn/trunk/doc/argparse-vs-optparse.html
>looks like it should be able to be integrated fairly easily into the
>existing optparse structure.
>
>Collin Winter

Having looked at the code for optparse, I would say, no, hacking the
optparse enhancements into optparse would be extremely difficult.  optparse
was designed by somebody who finds certain common patterns of option
parsing (required options, parsing options passed as /whatever) such 
a terrible idea that preventing people from doing these things, even
if they -really-, -really-, wanted to was a significant design goal.

Laura


More information about the stdlib-sig mailing list