[Python-Dev] PEP 389: argparse - new command line parsing module

Steven Bethard steven.bethard at gmail.com
Mon Sep 28 04:55:46 CEST 2009

On Sun, Sep 27, 2009 at 5:51 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> I am neutral on the idea of adding argparse. However, I'm -1 on deprecating
> optparse. It is very widely used (tons of scripts use it), and ok for many uses;
> deprecating it is totally unhelpful and gratuitous.

Could you elaborate?  If you are worried about Python 2.X scripts,
note from the PEP that the only things that will ever show up in
Python 2.X are:

  PendingDeprecation warnings, which by default are not displayed,
  and documentation notes directing users of getopt and optparse to

I think these messages are useful for folks using 2.X who some day
would like to migrate to 3.X, and at the same time should have zero
effect on existing scripts.

If you think getopt and optparse should stick around in 3.X, why is
that? If you think there are things that getopt and optparse do better
than argparse, could you please give some examples?

Where did you get that preposterous hypothesis?
Did Steve tell you that?
        --- The Hiphopopotamus

More information about the Python-Dev mailing list