summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authortoonarmycaptain <toonarmycaptain@hotmail.com>2019-05-08 16:02:34 (GMT)
committerJulien Palard <julien@palard.fr>2019-05-08 16:02:34 (GMT)
commit85225b6a58a516c50c055d5114668ed2fcdcda8c (patch)
tree2a9cc3d1261cc2cc6e56068463205cb84aa51b01 /Doc/c-api
parent1d4b16051f8550fd7dada3670a3e83ae13b99d3b (diff)
downloadcpython-85225b6a58a516c50c055d5114668ed2fcdcda8c.zip
cpython-85225b6a58a516c50c055d5114668ed2fcdcda8c.tar.gz
cpython-85225b6a58a516c50c055d5114668ed2fcdcda8c.tar.bz2
bpo-31873: Update unicode.rst - 'unicode' capitalization (GH-4125)
Update 'unicode' capitalization. 'Unicode' is a proper noun, and as such should be capitalized. Changed multiple instances.
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/unicode.rst24
1 files changed, 12 insertions, 12 deletions
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
index 97c5ebc..724c798 100644
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -22,14 +22,14 @@ in the Unicode object. The :c:type:`Py_UNICODE*` representation is deprecated
and inefficient; it should be avoided in performance- or memory-sensitive
situations.
-Due to the transition between the old APIs and the new APIs, unicode objects
+Due to the transition between the old APIs and the new APIs, Unicode objects
can internally be in two states depending on how they were created:
-* "canonical" unicode objects are all objects created by a non-deprecated
- unicode API. They use the most efficient representation allowed by the
+* "canonical" Unicode objects are all objects created by a non-deprecated
+ Unicode API. They use the most efficient representation allowed by the
implementation.
-* "legacy" unicode objects have been created through one of the deprecated
+* "legacy" Unicode objects have been created through one of the deprecated
APIs (typically :c:func:`PyUnicode_FromUnicode`) and only bear the
:c:type:`Py_UNICODE*` representation; you will have to call
:c:func:`PyUnicode_READY` on them before calling any other API.
@@ -152,7 +152,7 @@ access internal read-only data of Unicode objects:
.. c:function:: void* PyUnicode_DATA(PyObject *o)
- Return a void pointer to the raw unicode buffer. *o* has to be a Unicode
+ Return a void pointer to the raw Unicode buffer. *o* has to be a Unicode
object in the "canonical" representation (not checked).
.. versionadded:: 3.3
@@ -430,7 +430,7 @@ APIs:
.. c:function:: PyObject* PyUnicode_FromFormat(const char *format, ...)
Take a C :c:func:`printf`\ -style *format* string and a variable number of
- arguments, calculate the size of the resulting Python unicode string and return
+ arguments, calculate the size of the resulting Python Unicode string and return
a string with the values formatted into it. The variable arguments must be C
types and must correspond exactly to the format characters in the *format*
ASCII-encoded string. The following format characters are allowed:
@@ -504,9 +504,9 @@ APIs:
| :attr:`%A` | PyObject\* | The result of calling |
| | | :func:`ascii`. |
+-------------------+---------------------+--------------------------------+
- | :attr:`%U` | PyObject\* | A unicode object. |
+ | :attr:`%U` | PyObject\* | A Unicode object. |
+-------------------+---------------------+--------------------------------+
- | :attr:`%V` | PyObject\*, | A unicode object (which may be |
+ | :attr:`%V` | PyObject\*, | A Unicode object (which may be |
| | const char\* | *NULL*) and a null-terminated |
| | | C character array as a second |
| | | parameter (which will be used, |
@@ -1670,7 +1670,7 @@ They all return *NULL* or ``-1`` if an exception occurs.
.. c:function:: int PyUnicode_CompareWithASCIIString(PyObject *uni, const char *string)
- Compare a unicode object, *uni*, with *string* and return ``-1``, ``0``, ``1`` for less
+ Compare a Unicode object, *uni*, with *string* and return ``-1``, ``0``, ``1`` for less
than, equal, and greater than, respectively. It is best to pass only
ASCII-encoded strings, but the function interprets the input string as
ISO-8859-1 if it contains non-ASCII characters.
@@ -1680,7 +1680,7 @@ They all return *NULL* or ``-1`` if an exception occurs.
.. c:function:: PyObject* PyUnicode_RichCompare(PyObject *left, PyObject *right, int op)
- Rich compare two unicode strings and return one of the following:
+ Rich compare two Unicode strings and return one of the following:
* ``NULL`` in case an exception was raised
* :const:`Py_True` or :const:`Py_False` for successful comparisons
@@ -1708,7 +1708,7 @@ They all return *NULL* or ``-1`` if an exception occurs.
.. c:function:: void PyUnicode_InternInPlace(PyObject **string)
Intern the argument *\*string* in place. The argument must be the address of a
- pointer variable pointing to a Python unicode string object. If there is an
+ pointer variable pointing to a Python Unicode string object. If there is an
existing interned string that is the same as *\*string*, it sets *\*string* to
it (decrementing the reference count of the old string object and incrementing
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.
.. c:function:: PyObject* PyUnicode_InternFromString(const char *v)
A combination of :c:func:`PyUnicode_FromString` and
- :c:func:`PyUnicode_InternInPlace`, returning either a new unicode string
+ :c:func:`PyUnicode_InternInPlace`, returning either a new Unicode string
object that has been interned, or a new ("owned") reference to an earlier
interned string object with the same value.