On 1/5/07, Brett Cannon <[EMAIL PROTECTED]> 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 _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com