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: PyArg_ParseTuple 2.X docs mention int for "t#", but "Py_ssize_t" for "w#", etc.
Type: behavior Stage: resolved
Components: Documentation Versions: Python 2.7
process
Status: closed Resolution: out of date
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 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg208410 - (view) Author: Rob Browning (rlb) Date: 2014-01-18 19:22
Here (http://docs.python.org/2/c-api/arg.html), 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.

Thanks
msg370439 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-05-31 13:10
Python 2.7 is no longer supported.
History
Date User Action Args
2022-04-11 14:57:57adminsetgithub: 64495
2020-05-31 13:10:03serhiy.storchakasetstatus: open -> closed
resolution: out of date
messages: + msg370439

stage: needs patch -> resolved
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