summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-07-11 10:39:00 (GMT)
committerGeorg Brandl <georg@python.org>2009-07-11 10:39:00 (GMT)
commit9cbb125d7d1020f312612c77e96ff76c20c6d1a3 (patch)
tree5e225a50fc2cfcbf88fd2951a5b205ac2f93c1cc
parent489cb4f0b98e4d04bfef9ee14f93e4bab63ffcd7 (diff)
downloadcpython-9cbb125d7d1020f312612c77e96ff76c20c6d1a3.zip
cpython-9cbb125d7d1020f312612c77e96ff76c20c6d1a3.tar.gz
cpython-9cbb125d7d1020f312612c77e96ff76c20c6d1a3.tar.bz2
Merged revisions 73940 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r73940 | georg.brandl | 2009-07-11 12:37:38 +0200 (Sa, 11 Jul 2009) | 1 line #6430: add note about size of "u" type. ........
-rw-r--r--Doc/library/array.rst7
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/library/array.rst b/Doc/library/array.rst
index 200277f..78c433d 100644
--- a/Doc/library/array.rst
+++ b/Doc/library/array.rst
@@ -21,7 +21,7 @@ defined:
+-----------+----------------+-------------------+-----------------------+
| ``'B'`` | unsigned char | int | 1 |
+-----------+----------------+-------------------+-----------------------+
-| ``'u'`` | Py_UNICODE | Unicode character | 2 |
+| ``'u'`` | Py_UNICODE | Unicode character | 2 (see note) |
+-----------+----------------+-------------------+-----------------------+
| ``'h'`` | signed short | int | 2 |
+-----------+----------------+-------------------+-----------------------+
@@ -40,6 +40,11 @@ defined:
| ``'d'`` | double | float | 8 |
+-----------+----------------+-------------------+-----------------------+
+.. note::
+
+ The ``'u'`` typecode corresponds to Python's unicode character. On narrow
+ Unicode builds this is 2-bytes, on wide builds this is 4-bytes.
+
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 :attr:`itemsize` attribute.