@@ -22,14 +22,14 @@ in the Unicode object. The :c:type:`Py_UNICODE*` representation is deprecated
22
22
and inefficient; it should be avoided in performance- or memory-sensitive
23
23
situations.
24
24
25
- Due to the transition between the old APIs and the new APIs, unicode objects
25
+ Due to the transition between the old APIs and the new APIs, Unicode objects
26
26
can internally be in two states depending on how they were created:
27
27
28
- * "canonical" unicode objects are all objects created by a non-deprecated
29
- unicode API. They use the most efficient representation allowed by the
28
+ * "canonical" Unicode objects are all objects created by a non-deprecated
29
+ Unicode API. They use the most efficient representation allowed by the
30
30
implementation.
31
31
32
- * "legacy" unicode objects have been created through one of the deprecated
32
+ * "legacy" Unicode objects have been created through one of the deprecated
33
33
APIs (typically :c:func: `PyUnicode_FromUnicode `) and only bear the
34
34
:c:type: `Py_UNICODE* ` representation; you will have to call
35
35
:c:func: `PyUnicode_READY ` on them before calling any other API.
@@ -152,7 +152,7 @@ access internal read-only data of Unicode objects:
152
152
153
153
.. c:function:: void* PyUnicode_DATA(PyObject *o)
154
154
155
- Return a void pointer to the raw unicode buffer. *o * has to be a Unicode
155
+ Return a void pointer to the raw Unicode buffer. *o * has to be a Unicode
156
156
object in the "canonical" representation (not checked).
157
157
158
158
.. versionadded:: 3.3
@@ -430,7 +430,7 @@ APIs:
430
430
.. c :function :: PyObject* PyUnicode_FromFormat (const char *format, ...)
431
431
432
432
Take a C :c:func: `printf `\ -style *format * string and a variable number of
433
- arguments, calculate the size of the resulting Python unicode string and return
433
+ arguments, calculate the size of the resulting Python Unicode string and return
434
434
a string with the values formatted into it. The variable arguments must be C
435
435
types and must correspond exactly to the format characters in the *format *
436
436
ASCII-encoded string. The following format characters are allowed:
@@ -504,9 +504,9 @@ APIs:
504
504
| :attr: `%A ` | PyObject\* | The result of calling |
505
505
| | | :func: `ascii `. |
506
506
+-------------------+---------------------+--------------------------------+
507
- | :attr: `%U ` | PyObject\* | A unicode object. |
507
+ | :attr: `%U ` | PyObject\* | A Unicode object. |
508
508
+-------------------+---------------------+--------------------------------+
509
- | :attr: `%V ` | PyObject\* , | A unicode object (which may be |
509
+ | :attr: `%V ` | PyObject\* , | A Unicode object (which may be |
510
510
| | const char\* | *NULL *) and a null-terminated |
511
511
| | | C character array as a second |
512
512
| | | parameter (which will be used, |
@@ -1670,7 +1670,7 @@ They all return *NULL* or ``-1`` if an exception occurs.
1670
1670
1671
1671
.. c :function :: int PyUnicode_CompareWithASCIIString (PyObject *uni, const char *string)
1672
1672
1673
- Compare a unicode object, *uni *, with *string * and return ``-1 ``, ``0 ``, ``1 `` for less
1673
+ Compare a Unicode object, *uni *, with *string * and return ``-1 ``, ``0 ``, ``1 `` for less
1674
1674
than, equal, and greater than, respectively. It is best to pass only
1675
1675
ASCII-encoded strings, but the function interprets the input string as
1676
1676
ISO-8859-1 if it contains non-ASCII characters.
@@ -1680,7 +1680,7 @@ They all return *NULL* or ``-1`` if an exception occurs.
1680
1680
1681
1681
.. c :function :: PyObject* PyUnicode_RichCompare (PyObject *left, PyObject *right, int op)
1682
1682
1683
- Rich compare two unicode strings and return one of the following:
1683
+ Rich compare two Unicode strings and return one of the following:
1684
1684
1685
1685
* ``NULL `` in case an exception was raised
1686
1686
* :const: `Py_True ` or :const: `Py_False ` for successful comparisons
@@ -1708,7 +1708,7 @@ They all return *NULL* or ``-1`` if an exception occurs.
1708
1708
.. c :function :: void PyUnicode_InternInPlace (PyObject **string)
1709
1709
1710
1710
Intern the argument *\* string * in place. The argument must be the address of a
1711
- pointer variable pointing to a Python unicode string object. If there is an
1711
+ pointer variable pointing to a Python Unicode string object. If there is an
1712
1712
existing interned string that is the same as *\* string *, it sets *\* string * to
1713
1713
it (decrementing the reference count of the old string object and incrementing
1714
1714
the reference count of the interned string object), otherwise it leaves
@@ -1721,6 +1721,6 @@ They all return *NULL* or ``-1`` if an exception occurs.
1721
1721
.. c:function:: PyObject* PyUnicode_InternFromString(const char *v)
1722
1722
1723
1723
A combination of :c:func: `PyUnicode_FromString ` and
1724
- :c:func: `PyUnicode_InternInPlace `, returning either a new unicode string
1724
+ :c:func: `PyUnicode_InternInPlace `, returning either a new Unicode string
1725
1725
object that has been interned, or a new ("owned") reference to an earlier
1726
1726
interned string object with the same value.
0 commit comments