diff options
| author | Guido van Rossum <guido@python.org> | 1997-01-03 19:20:52 +0000 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 1997-01-03 19:20:52 +0000 |
| commit | a31986430a1777943942292acfd0d540234936fd (patch) | |
| tree | f96a30d7ea979091c8f6b8b070d345b3740370de /Doc/libarray.tex | |
| parent | 04bb4f5aee1b37e66dc15495a772c9f3483197db (diff) | |
| download | cpython-a31986430a1777943942292acfd0d540234936fd.tar.gz | |
Added unsigned data formats (B, H, I, L).
Diffstat (limited to 'Doc/libarray.tex')
| -rw-r--r-- | Doc/libarray.tex | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Doc/libarray.tex b/Doc/libarray.tex index 8122f4965b..1b028b339d 100644 --- a/Doc/libarray.tex +++ b/Doc/libarray.tex @@ -12,16 +12,23 @@ which is a single character. The following type codes are defined: \begin{tableiii}{|c|c|c|}{code}{Typecode}{Type}{Minimal size in bytes} \lineiii{'c'}{character}{1} \lineiii{'b'}{signed integer}{1} +\lineiii{'B'}{unsigned integer}{1} \lineiii{'h'}{signed integer}{2} +\lineiii{'H'}{unsigned integer}{2} \lineiii{'i'}{signed integer}{2} +\lineiii{'I'}{unsigned integer}{2} \lineiii{'l'}{signed integer}{4} +\lineiii{'L'}{unsigned integer}{4} \lineiii{'f'}{floating point}{4} \lineiii{'d'}{floating point}{8} \end{tableiii} The actual representation of values is determined by the machine architecture (strictly speaking, by the C implementation). The actual -size can be accessed through the \var{itemsize} attribute. +size can be accessed through the \var{itemsize} attribute. The values +stored for \code{'L'} and \code{'I'} items will be represented as +Python long integers when retrieved, because Python's plain integer +type can't represent the full range of C's unsigned (long) integers. See also built-in module \code{struct}. \bimodindex{struct} |
