[ python-Feature Requests-1073305 ] Extension to optparse: options with facultative value

SourceForge.net noreply at sourceforge.net
Sat Nov 27 22:50:39 CET 2004


Feature Requests item #1073305, was opened at 2004-11-25 12:00
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1073305&group_id=5470

Category: Python Library
Group: None
>Status: Closed
>Resolution: Duplicate
Priority: 5
Submitted By: pollastri (pollastri)
Assigned to: Nobody/Anonymous (nobody)
Summary: Extension to optparse: options with facultative value

Initial Comment:
When parsing command line options, I found very useful
to have an
option with a facultative value, able to do the following:

1-tell to me if the option was or was not seen on the
command line, return the value None if the option was
not seen;

2-if the option only was specified, return a default value.

3-if the option with a value was specified on the
command line, return the specified value;

A way to reach this goal can be the addition of a new
value for the options actions in module optparse, it
may be something like "store_with_default".





----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2004-11-27 16:50

Message:
Logged In: YES 
user_id=33168

Duplicate of 1073198

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1073305&group_id=5470


More information about the Python-bugs-list mailing list