Mercurial > cpython-lru_cache-weakref
diff Doc/lib/libarray.tex @ 6022:802470c7a50f legacy-trunk
Added buffer_info() docs.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 14 Aug 1997 19:50:37 +0000 |
| parents | 3468ea8645ca |
| children | d03f2e2fbf36 |
line wrap: on
line diff
--- a/Doc/lib/libarray.tex Thu Aug 14 19:50:18 1997 +0000 +++ b/Doc/lib/libarray.tex Thu Aug 14 19:50:37 1997 +0000 @@ -60,6 +60,16 @@ Append a new item with value \var{x} to the end of the array. \end{funcdesc} +\begin{funcdesc}{buffer_info}{} +Return a tuple \code{(\var{address}, var{length})} giving the current +memory address and the length in bytes of the buffer used to hold +array's contents. This is occasionally useful when working with +low-level (and inherently unsafe) I/O interfaces that require memory +addresses, such as certain \code{ioctl} operations. The returned +numbers are valid as long as the array exists and no length-changing +operations are applied to it. +\end{funcdesc} + \begin{funcdesc}{byteswap}{x} ``Byteswap'' all items of the array. This is only supported for integer values. It is useful when reading data from a file written
