A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-July/074046.html below:

[Python-Dev] add bool type to optparse

[Python-Dev] add bool type to optparse [Python-Dev] add bool type to optparseGuido van Rossum guido at python.org
Tue Jul 31 20:09:51 CEST 2007
Why not submit a patch to Greg Ward? http://optik.sourceforge.net/

On 7/31/07, Neal Becker <ndbecker2 at gmail.com> wrote:
> A.M. Kuchling wrote:
>
> > On Mon, Jul 30, 2007 at 09:50:38AM -0400, Neal Becker wrote:
> >> Subject says it all.
> >
> > Why is boolean support needed, given that optparse has store_true and
> > store_false actions?  Example usage:
> >
> >     parser.add_option('--confirm', action='store_true', dest='confirm')
> >
> > --amk
>
> So you can do:
> --option=false
>
> Otherwise you have to do something like:
> (action='store_false', default=True)
>
> and use:
> --no-option
>
> which is OK sometimes, but why not allow a choice?
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org
>


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
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