Title: misc TYPO in argparse.Action docstring
Type: behavior Stage: resolved
Components: Documentation, Library (Lib) Versions: Python 3.2, Python 3.3, Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: bethard, docs@python, python-dev, r.david.murray, shima__shima, terry.reedy
Priority: normal Keywords: easy, patch

Created on 2012-03-23 06:25 by shima__shima, last changed 2012-07-21 21:08 by r.david.murray. This issue is now closed.

File name Uploaded Description Edit shima__shima, 2012-03-23 06:25
Messages (5)
msg156635 - (view) Author: Toshihiro Kamishima (shima__shima) Date: 2012-03-23 06:25
Keywords to specify as string type are incorrect.
'string' should be 'str'
msg156727 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2012-03-25 00:53
The patch, to an unspecified version of 2.7, changes 'str' to 'string', so I presume that is what you meant. The current repository code already says 'string' for 2.7, 3.2, and 3.3. This is what you should see in the current release candidates, including 2.7.3rc2
msg166061 - (view) Author: Steven Bethard (bethard) * (Python committer) Date: 2012-07-21 20:13
The patch supplied was in reverse, but the bug report was correct. You can't pass "type=string" since there's no string callable, only a str callable.

The docstring is confusing because the quotes make it looks like we mean the string 'str', when we actually mean the callable 'str'. Maybe they should be `str` or ``str``? Not sure what the syntax for code, not string literals, is for docstrings.

Anyway, this should be an easy fix for a doc person.
msg166069 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-07-21 21:07
New changeset e7f205ce080e by R David Murray in branch '3.2':
#14391: clarify docstring discussion of Action's 'type' argument's value.

New changeset 3d1ea33611c1 by R David Murray in branch 'default':
Merge #14391: clarify docstring discussion of Action's 'type' argument's value.

New changeset 905d9bdae970 by R David Murray in branch '2.7':
#14391: clarify docstring discussion of Action's 'type' argument's value.
msg166070 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-07-21 21:08
I reworded it so that it is clear we are talking about types and not strings.
Date User Action Args
2012-07-21 21:08:41r.david.murraysetstatus: open -> closed

type: enhancement -> behavior
versions: + Python 3.2, Python 3.3
nosy: + r.david.murray

messages: + msg166070
resolution: fixed
stage: patch review -> resolved
2012-07-21 21:07:04python-devsetnosy: + python-dev
messages: + msg166069
2012-07-21 20:13:22bethardsetkeywords: + easy
status: closed -> open
resolution: out of date -> (no value)
messages: + msg166061
2012-03-25 00:53:20terry.reedysetstatus: open -> closed

assignee: docs@python
components: + Documentation

nosy: + terry.reedy, docs@python, bethard
messages: + msg156727
resolution: out of date
stage: patch review
2012-03-23 06:25:33shima__shimacreate