When argparse will be in the python standard installation

Steven Bethard steven.bethard at gmail.com
Wed Jan 3 16:16:28 EST 2007


Martin v. Löwis wrote:
> PengYu.UT at gmail.com schrieb:
>> I feel argparse has some useful things that optparse doesn't have. But
>> I can't find it argparse in python library reference. I'm wondering
>> when it will be available in the python standard installation.
> 
> On its own, never. Somebody has to contribute it to Python, and that
> somebody has to be the author.

As the author of argparse, I'm happy to contribute it, though I've been 
thinking that it would be more appropriate for the Python 3.0 line than 
the Python 2.X line.

> However, it would be better if missing features where provided in
> existing libraries, rather than introducing new libraries to replace
> the existing ones (i.e. I would likely reject a patch to add yet another
> argument parsing library - we already have getopt and optparse).

That was my original intention, and argparse started out using the 
optparse code. But optparse is quite difficult to extend, and in the 
end, when I found that I had monkey-patched or rewritten just about 
everything in optparse, I decided to drop the optparse code entirely.

If someone has an idea how to include argparse features into optparse, 
I'm certainly all for it. But I tried and failed to do this myself, so I 
don't know how to go about it.

STeVe



More information about the Python-list mailing list