[New-bugs-announce] [issue24278] Docs on Parsing arguments should say something about mem mgmt for formatters returning C strings
Martin Blais
report at bugs.python.org
Sun May 24 17:27:38 CEST 2015
New submission from Martin Blais:
Functions that parse arguments like PyArg_ParseTupleAndKeywords() have several formatters that fill in C strings, e.g. "s".
In the C API doc:
https://docs.python.org/3.5/c-api/arg.html#c.PyArg_ParseTupleAndKeywords
There should be an explicit mention of whether this memory needs to be free (in this case: No) and if not, how this memory is managed (in this case: This refers to a buffer managed by the string object itself). Because of questions of encoding, it raises questions where this memory lies, and what its lifetime is (in this case: That of the owning string object from the caller).
This deserves an explicit mention, even if brief.
----------
assignee: docs at python
components: Documentation
messages: 243987
nosy: blais, docs at python
priority: normal
severity: normal
status: open
title: Docs on Parsing arguments should say something about mem mgmt for formatters returning C strings
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24278>
_______________________________________
More information about the New-bugs-announce
mailing list