]> granicus.if.org Git - python/commitdiff
Merged revisions 73940 via svnmerge from
authorGeorg Brandl <georg@python.org>
Sat, 11 Jul 2009 10:39:00 +0000 (10:39 +0000)
committerGeorg Brandl <georg@python.org>
Sat, 11 Jul 2009 10:39:00 +0000 (10:39 +0000)
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.
........

Doc/library/array.rst

index 200277fe848c954209cee57ae0f36873f4c4ec35..78c433d1124bc4c22bf376e998ef01ebd0c92a09 100644 (file)
@@ -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.