A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-January/042252.html below:

[Python-Dev] Hotshot

[Python-Dev] Hotshot [Python-Dev] HotshotBarry Warsaw barry at python.org
Mon Jan 26 11:36:48 EST 2004
On Mon, 2004-01-26 at 10:40, Guido van Rossum wrote:
> >     Walter> Maybe this script should use optparse instead of getopt?
> > 
> > How would optparse be better than getopt, especially for simple use
> > such as this?
> 
> Optparse is *always* better than getopt, once you're used to it.  Even
> for a single option it's usually fewer lines of code.

And with Optparse it's much easier to add/remove options since each
option's spec and handling is in one place, instead of spread out in
several places.  I do have a few minor nits with optparse though[1]. 
Even so, +1 on using Optparse for all new scripts.

-Barry

[1] e.g
http://sourceforge.net/tracker/?group_id=5470&atid=105470&func=detail&aid=842213



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4