[Python-3000] PEP 3108 and modules to be removed (current list)

Steven Bethard steven.bethard at gmail.com
Sat Jan 6 03:54:50 CET 2007


On 1/5/07, Brett Cannon <brett at python.org> wrote:
> * getopt
>
>   + optparse provides better functionality.
>   + But ...
>
>     - getopt is still widely used.
>     - optparse does not handle the issue of when people set
>       incompatible options very well.
>     - optparse does not allow option arguments to be optional.

Just wanted to mention that at the `request of c.l.py`_ I'm planning
to write a Python 3000 PEP to either replace or merge optparse with
argparse_. The argparse module is an optparse-like library that
handles both optional and positional arguments, and among other things
supports "optional option arguments". Both optparse and argparse
support incompatible options pretty well AFAICT -- see my `response in
Brett's blog`_ -- so I'm not sure what the middle point above is all
about.

So maybe PEP 3108 should just leave both getopt and optparse around,
and I should add a section in my PEP about how to update getopt code
to optparse/argparse code?

.. _request of c.l.py:
http://mail.python.org/pipermail/python-list/2007-January/420952.html
.. _argparse: http://argparse.python-hosting.com/
.. _response in Brett's blog:
http://sayspy.blogspot.com/2007/01/stdlib-reorg-pep-has-been-added.html#comment-2017147891520627677

STeVe
-- 
I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a
tiny blip on the distant coast of sanity.
        --- Bucky Katt, Get Fuzzy


More information about the Python-3000 mailing list