classification
Title: Recommend "*" over "#" in getargs.c typecodes
Type: Stage:
Components: Documentation, Interpreter Core Versions: Python 3.2, Python 3.1, Python 2.7, Python 2.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: georg.brandl, pitrou
Priority: normal Keywords:

Created on 2009-09-29 10:59 by pitrou, last changed 2010-10-29 10:07 by admin.

Messages (2)
msg93276 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-09-29 10:59
In « Parsing arguments and building values » (c-api/arg.html), it should
be made clear that "*" typecodes are recommended over the "#" typecodes,
which are inherently unsafe.

(more generally, the page is totally unreadable, a solution might be to
group the typecodes by family: numbers, strings/buffers, objects; also,
there are so many choices that it's confusing which ones should be
preferred)
msg93279 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-09-29 11:14
This only really applies in 2.x, actually. In 3.x, "#" should be
discouraged for another reason: it is overly strict and will only accept
pure read-only objects (which don't have a bf_releasebuffer method);
even bytearrays will be rejected.
History
Date User Action Args
2010-10-29 10:07:21adminsetassignee: georg.brandl -> docs@python
2009-09-29 11:14:48pitrousetmessages: + msg93279
2009-09-29 10:59:14pitroucreate