Title: PyArg_ParseTuple 2.X docs mention int for "t#", but "Py_ssize_t" for "w#", etc.
Type: behavior Stage: needs patch
Components: Documentation Versions: Python 2.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, rlb, serhiy.storchaka, vstinner
Priority: normal Keywords: easy

Created on 2014-01-18 19:22 by rlb, last changed 2014-11-19 15:38 by vstinner.

Messages (1)
msg208410 - (view) Author: Rob Browning (rlb) Date: 2014-01-18 19:22
Here (, the documentation for "t#" says:

  t# (read-only character buffer) [char *, int]...

while the documentation for "w#" says:

  w# (read-write character buffer) [char *, Py_ssize_t]...

However, from getargs.c, it looks like they're handled the same with respect to the size type.

At a minimum, it seems like it might make sense to change these docs to match, and if "w#" and "t#" are actually handled similarly to "s#", it would be even better to just change their docs to match (or refer to) "s#"'s which are more detailed, i.e. they mention the PY_SSIZE_T_CLEAN issues, etc.

Date User Action Args
2014-11-19 15:38:16vstinnersetnosy: + vstinner, serhiy.storchaka
2014-11-19 09:15:37serhiy.storchakasetkeywords: + easy
type: behavior
stage: needs patch
2014-01-18 19:22:50rlbcreate