Skip to content

Commit ec60c14

Browse files
committed
fix sphinx docs
1 parent 2009a2d commit ec60c14

1 file changed

Lines changed: 9 additions & 22 deletions

File tree

Doc/library/array.rst

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ defined:
2222
+-----------+--------------------+-------------------+-----------------------+-------+
2323
| ``'B'`` | unsigned char | int | 1 | |
2424
+-----------+--------------------+-------------------+-----------------------+-------+
25-
| ``'u'`` | wchar_t | Unicode character | 2 | \(1) |
26-
+-----------+--------------------+-------------------+-----------------------+-------+
27-
| ``'w'`` | Py_UCS4 | Unicode character | 4 | \(2) |
25+
| ``'w'`` | Py_UCS4 | Unicode character | 4 | \(1) |
2826
+-----------+--------------------+-------------------+-----------------------+-------+
2927
| ``'h'`` | signed short | int | 2 | |
3028
+-----------+--------------------+-------------------+-----------------------+-------+
@@ -42,35 +40,24 @@ defined:
4240
+-----------+--------------------+-------------------+-----------------------+-------+
4341
| ``'Q'`` | unsigned long long | int | 8 | |
4442
+-----------+--------------------+-------------------+-----------------------+-------+
45-
| ``'e'`` | _Float16 | float | 2 | \(3) |
43+
| ``'e'`` | _Float16 | float | 2 | \(2) |
4644
+-----------+--------------------+-------------------+-----------------------+-------+
4745
| ``'f'`` | float | float | 4 | |
4846
+-----------+--------------------+-------------------+-----------------------+-------+
4947
| ``'d'`` | double | float | 8 | |
5048
+-----------+--------------------+-------------------+-----------------------+-------+
51-
| ``'Zf'`` | float complex | complex | 8 | \(4) |
49+
| ``'Zf'`` | float complex | complex | 8 | \(3) |
5250
+-----------+--------------------+-------------------+-----------------------+-------+
53-
| ``'Zd'`` | double complex | complex | 16 | \(4) |
51+
| ``'Zd'`` | double complex | complex | 16 | \(3) |
5452
+-----------+--------------------+-------------------+-----------------------+-------+
5553

5654

5755
Notes:
5856

5957
(1)
60-
It can be 16 bits or 32 bits depending on the platform.
61-
62-
.. versionchanged:: 3.9
63-
``array('u')`` now uses :c:type:`wchar_t` as C type instead of deprecated
64-
``Py_UNICODE``. This change doesn't affect its behavior because
65-
``Py_UNICODE`` is alias of :c:type:`wchar_t` since Python 3.3.
66-
67-
.. deprecated-removed:: 3.3 3.16
68-
Please migrate to ``'w'`` typecode.
69-
70-
(2)
7158
.. versionadded:: 3.13
7259

73-
(3)
60+
(2)
7461
The IEEE 754 binary16 "half precision" type was introduced in the 2008
7562
revision of the `IEEE 754 standard <ieee 754 standard_>`_.
7663
This type is not widely supported by C compilers. It's available
@@ -79,7 +66,7 @@ Notes:
7966

8067
.. versionadded:: 3.15
8168

82-
(4)
69+
(3)
8370
Complex types (``Zf`` and ``Zd``) are available unconditionally,
8471
regardless on support for complex types (the Annex G of the C11 standard)
8572
by the C compiler.
@@ -220,7 +207,7 @@ The module defines the following type:
220207
.. method:: fromunicode(ustr, /)
221208

222209
Extends this array with data from the given Unicode string.
223-
The array must have type code ``'u'`` or ``'w'``; otherwise a :exc:`ValueError` is raised.
210+
The array must have type code ``'w'``; otherwise a :exc:`ValueError` is raised.
224211
Use ``array.frombytes(unicodestring.encode(enc))`` to append Unicode data to an
225212
array of some other type.
226213

@@ -288,15 +275,15 @@ The module defines the following type:
288275

289276
.. method:: tounicode()
290277

291-
Convert the array to a Unicode string. The array must have a type ``'u'`` or ``'w'``;
278+
Convert the array to a Unicode string. The array must have a type ``'w'``;
292279
otherwise a :exc:`ValueError` is raised. Use ``array.tobytes().decode(enc)`` to
293280
obtain a Unicode string from an array of some other type.
294281

295282

296283
The string representation of array objects has the form
297284
``array(typecode, initializer)``.
298285
The *initializer* is omitted if the array is empty, otherwise it is
299-
a Unicode string if the *typecode* is ``'u'`` or ``'w'``, otherwise it is
286+
a Unicode string if the *typecode* is ``'w'``, otherwise it is
300287
a list of numbers.
301288
The string representation is guaranteed to be able to be converted back to an
302289
array with the same type and value using :func:`eval`, so long as the

0 commit comments

Comments
 (0)