[ python-Bugs-1183972 ] dest parameter in optparse

SourceForge.net noreply at sourceforge.net
Sat Jun 10 18:42:41 CEST 2006


Bugs item #1183972, was opened at 2005-04-15 15:39
Message generated for change (Settings changed) made by gward
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1183972&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.3
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: ahmado (ahmado)
Assigned to: Greg Ward (gward)
Summary: dest parameter in optparse

Initial Comment:
When using the "callback" action, optparse requires 
that you STILL specify a "dest" parameter, though it is 
not required or used by the option parser.  

In fact, if you do not include the "dest" parameter, your 
options will still work properly, but optparse will 
generate an exception when calling the "--help" option.  

Not specifying a "dest" parameter will result in the 
following Exception when using the default "--help" or "-
h" option:

File "c:\Python23\lib\optparse.py", line 229, in 
format_option_strings
    metavar = option.metavar or option.dest.upper()
AttributeError: 'NoneType' object has no attribute 'upper'

<workaround>
by simply adding a bogus bug, the --help / -h option 
works properly even though the dest isn't actually used.
</workaround>









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

>Comment By: Greg Ward (gward)
Date: 2006-06-10 12:42

Message:
Logged In: YES 
user_id=14422

No response from original poster after almost a year, so I'm
assuming that I did indeed fix this bug in Optik 1.5 /
Python 2.4.


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

Comment By: Greg Ward (gward)
Date: 2005-08-09 20:57

Message:
Logged In: YES 
user_id=14422

ahmado -- please check if this bug is still present in
Python 2.4 / Optik 1.5.  If you do not respond in a week or
two, I will assume that the bug is fixed and close this report.


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

Comment By: Greg Ward (gward)
Date: 2005-07-21 22:03

Message:
Logged In: YES 
user_id=14422

I'm pretty sure I fixed this in Optik 1.5 / Python 2.4.  Can
you 1) verify if the bug is still there in Python 2.4 and 2)
if so, supply a small script demonstrating the problem?

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

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


More information about the Python-bugs-list mailing list