On Fri, Mar 5, 2010 at 10:51 AM, Neal Becker <ndbeck...@gmail.com> wrote:
> I generally enjoy argparse, but one thing I find rather
> ugly and unpythonic.
>
>    parser.add_argument ('--plot', action='store_true')
>
> Specifying the argument 'action' as a string is IMO ugly.

If it really bothers you, you can use:

    action=argparse._StoreTrueAction

instead. Undocumented (purposefully) but that's all argparse is doing
under the covers.

Steve
-- 
Where did you get that preposterous hypothesis?
Did Steve tell you that?
        --- The Hiphopopotamus
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to