diff options
author | Raymond Hettinger <python@rcn.com> | 2003-10-12 18:24:34 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-10-12 18:24:34 (GMT) |
commit | cb2da43db8943e9e7b1d900bce1d6416339d6f64 (patch) | |
tree | 91873c9ad0b19e9ab7e40f7d0a79db1bbc823df5 /Doc | |
parent | d662548c728e5e1da15d5594a8b6e751213002f8 (diff) | |
download | cpython-cb2da43db8943e9e7b1d900bce1d6416339d6f64.zip cpython-cb2da43db8943e9e7b1d900bce1d6416339d6f64.tar.gz cpython-cb2da43db8943e9e7b1d900bce1d6416339d6f64.tar.bz2 |
Extended tuple's C API to include a new function, PyTuple_Pack() that is
useful for rapidly building argument tuples without having to invoke the
more sophisticated machinery of Py_BuildValue().
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/api/concrete.tex | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Doc/api/concrete.tex b/Doc/api/concrete.tex index 5b0d9e3..7b84092 100644 --- a/Doc/api/concrete.tex +++ b/Doc/api/concrete.tex @@ -973,7 +973,7 @@ which is \ASCII. The file system calls should use \cdata{Py_FileSystemDefaultEncoding} as the encoding for file names. This variable should be treated as read-only: On some systems, it will be a pointer to a static string, on others, it will change at -run-time, e.g. when the application invokes setlocale. +run-time (such as when the application invokes setlocale). Error handling is set by errors which may also be set to \NULL{} meaning to use the default handling defined for the codec. Default @@ -1584,6 +1584,14 @@ format. Return a new tuple object of size \var{len}, or \NULL{} on failure. \end{cfuncdesc} +\begin{cfuncdesc}{PyObject*}{PyTuple_Pack}{int n, \moreargs} + Return a new tuple object of size \var{n}, or \NULL{} on failure. + The tuple values are initialized to the subsequent \var{n} C arguments + pointing to Python objects. \samp{PyTuple_Pack(2, \var{a}, \var{b})} + is equivalent to \samp{Py_BuildValue("(OO)", \var{a}, \var{b})}. + \versionadded{2.4} +\end{cfuncdesc} + \begin{cfuncdesc}{int}{PyTuple_Size}{PyObject *p} Takes a pointer to a tuple object, and returns the size of that tuple. |