[docs] [issue8925] Improve c-api/arg.rst: use "bytes" or "str" types instead of "string"

STINNER Victor report at bugs.python.org
Sun Jun 6 21:03:55 CEST 2010

New submission from STINNER Victor <victor.stinner at haypocalc.com>:

http://docs.python.org/py3k/c-api/arg.html is unclear about what is a "string".

Attached patch:
 - Use directly bytes, bytearray and str types
 - Replace "default encoding" by "``'utf-8'`` encoding"
 - Add bytes and/or bytearray to "... buffer compatible object" because it's not easy to understand what is a buffer compatible object, especially because there are different kind of buffer objects: read-only, read-write, pinned, etc.
 - Fix reST syntax ("..note ::")
 - Fix "es", "es#", "et" and "et#" formats: they doesn't accept "character buffer compatible object" (can someone double check that?)

Py_BuildValue(): I choosed to mark U and U# formats as deprecated alias to s/s# => see issue #8848.

I wrote the patch by reading getargs.c.

assignee: docs at python
components: Documentation, Unicode
files: arg.patch
keywords: patch
messages: 107209
nosy: docs at python, haypo
priority: normal
severity: normal
status: open
title: Improve c-api/arg.rst: use "bytes" or "str" types instead of "string"
versions: Python 3.2
Added file: http://bugs.python.org/file17576/arg.patch

Python tracker <report at bugs.python.org>

More information about the docs mailing list