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

Laura Creighton lac at openend.se
Fri Sep 11 14:29:25 CEST 2009


In a message of Fri, 11 Sep 2009 06:48:21 +0200, Laura Creighton writes:
>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.  optpar
>se
>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

Ooops, I see now that I misread your question, as 'can we stick the
new argparse things into optparse' rather than the other way around.
Sorry about that.

Laura


More information about the stdlib-sig mailing list