Kaydet (Commit) 7750505d authored tarafından Georg Brandl's avatar Georg Brandl

#6430: add note about size of "u" type.

üst 7c150bf9
...@@ -24,7 +24,7 @@ defined: ...@@ -24,7 +24,7 @@ defined:
+-----------+----------------+-------------------+-----------------------+ +-----------+----------------+-------------------+-----------------------+
| ``'B'`` | unsigned char | int | 1 | | ``'B'`` | unsigned char | int | 1 |
+-----------+----------------+-------------------+-----------------------+ +-----------+----------------+-------------------+-----------------------+
| ``'u'`` | Py_UNICODE | Unicode character | 2 | | ``'u'`` | Py_UNICODE | Unicode character | 2 (see note) |
+-----------+----------------+-------------------+-----------------------+ +-----------+----------------+-------------------+-----------------------+
| ``'h'`` | signed short | int | 2 | | ``'h'`` | signed short | int | 2 |
+-----------+----------------+-------------------+-----------------------+ +-----------+----------------+-------------------+-----------------------+
...@@ -43,6 +43,11 @@ defined: ...@@ -43,6 +43,11 @@ defined:
| ``'d'`` | double | float | 8 | | ``'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 The actual representation of values is determined by the machine architecture
(strictly speaking, by the C implementation). The actual size can be accessed (strictly speaking, by the C implementation). The actual size can be accessed
through the :attr:`itemsize` attribute. The values stored for ``'L'`` and through the :attr:`itemsize` attribute. The values stored for ``'L'`` and
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment