diff options
author | Walter Dörwald <walter@livinglogic.de> | 2007-05-04 19:28:21 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2007-05-04 19:28:21 (GMT) |
commit | 612344f12774cbbefd735d9fcbfb2001fe187362 (patch) | |
tree | 3be6051c7e4ac7fe3a93372fa3d86bce06072e1f /Doc/ext/extending.tex | |
parent | c2b87a6dff1edade6542a484cb9b9419b254c1ed (diff) | |
download | cpython-612344f12774cbbefd735d9fcbfb2001fe187362.zip cpython-612344f12774cbbefd735d9fcbfb2001fe187362.tar.gz cpython-612344f12774cbbefd735d9fcbfb2001fe187362.tar.bz2 |
Change UnicodeDecodeError objects so that the 'object' attribute
is a bytes object.
Add 'y' and 'y#' format specifiers that work like 's' and 's#'
but only accept bytes objects.
Diffstat (limited to 'Doc/ext/extending.tex')
-rw-r--r-- | Doc/ext/extending.tex | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/ext/extending.tex b/Doc/ext/extending.tex index 2af88b5..1f3e2d5 100644 --- a/Doc/ext/extending.tex +++ b/Doc/ext/extending.tex @@ -802,8 +802,10 @@ Examples (to the left the call, to the right the resulting Python value): Py_BuildValue("i", 123) 123 Py_BuildValue("iii", 123, 456, 789) (123, 456, 789) Py_BuildValue("s", "hello") 'hello' + Py_BuildValue("y", "hello") b'hello' Py_BuildValue("ss", "hello", "world") ('hello', 'world') Py_BuildValue("s#", "hello", 4) 'hell' + Py_BuildValue("y#", "hello", 4) b'hell' Py_BuildValue("()") () Py_BuildValue("(i)", 123) (123,) Py_BuildValue("(ii)", 123, 456) (123, 456) |