This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Extension to optparse: options with facultative value
Type: enhancement Stage:
Components: Library (Lib) Versions:
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: nnorwitz, pollastri
Priority: normal Keywords:

Created on 2004-11-25 17:00 by pollastri, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg54309 - (view) Author: pollastri (pollastri) Date: 2004-11-25 17:00
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".

msg54310 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2004-11-27 21:50
Logged In: YES 

Duplicate of 1073198
Date User Action Args
2022-04-11 14:56:08adminsetgithub: 41229
2004-11-25 17:00:41pollastricreate