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.

classification
Title: optparse: extending actions missing ALWAYS_TYPED_ACTIONS
Type: Stage:
Components: Documentation Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gward Nosy List: chrism1, gward
Priority: normal Keywords:

Created on 2006-03-14 02:07 by chrism1, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg27775 - (view) Author: Christopher (chrism1) Date: 2006-03-14 02:07
http://docs.python.org/lib/optparse-adding-new-actions.
html

This page of docs should include the ALWAYS_TYPED_
ACTIONS list from optparse.py. In the example, unless 
you add the following line:

    ALWAYS_TYPED_ACTIONS = Option.ALWAYS_TYPED_ACTIONS 
+ ("dict",)

, then the "Value" variable gets no value unless you 
explicitly pass "type='string'" to parser.add_option().

msg27776 - (view) Author: Greg Ward (gward) (Python committer) Date: 2006-06-10 16:40
Logged In: YES 
user_id=14422

Oops!  Quite right.  Thanks for catching this.

This is actually a bug in Optik's documentation, so the real
fix is there (rev 517 of Optik svn).

Fixed in Python svn: rev 46821 (Doc/lib/liboptparse.tex).
This is trunk (Python 2.5) only.

(BTW, you forgot to mention which example had this error. 
Also, the  new action in the example is "extend", not
"dict".   This would have been a bit quicker and easier to
fix if those details had been there.) 
History
Date User Action Args
2022-04-11 14:56:15adminsetgithub: 43031
2006-03-14 02:07:02chrism1create