Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc

This affects documentation, code comments, and a debugging messages.
This commit is contained in:
Martin Panter 2016-04-15 02:14:19 +00:00
parent 7d82d0366b
commit 6245cb3c01
35 changed files with 52 additions and 52 deletions

View file

@ -285,7 +285,7 @@ an error value).
.. c:function:: int PyErr_WarnEx(PyObject *category, const char *message, Py_ssize_t stack_level)
Issue a warning message. The *category* argument is a warning category (see
below) or *NULL*; the *message* argument is an UTF-8 encoded string. *stack_level* is a
below) or *NULL*; the *message* argument is a UTF-8 encoded string. *stack_level* is a
positive number giving a number of stack frames; the warning will be issued from
the currently executing line of code in that stack frame. A *stack_level* of 1
is the function calling :c:func:`PyErr_WarnEx`, 2 is the function above that,
@ -609,7 +609,7 @@ The following functions are used to create and modify Unicode exceptions from C.
.. c:function:: PyObject* PyUnicodeTranslateError_Create(const Py_UNICODE *object, Py_ssize_t length, Py_ssize_t start, Py_ssize_t end, const char *reason)
Create a :class:`UnicodeTranslateError` object with the attributes *object*,
*length*, *start*, *end* and *reason*. *reason* is an UTF-8 encoded string.
*length*, *start*, *end* and *reason*. *reason* is a UTF-8 encoded string.
.. c:function:: PyObject* PyUnicodeDecodeError_GetEncoding(PyObject *exc)
PyObject* PyUnicodeEncodeError_GetEncoding(PyObject *exc)

View file

@ -72,7 +72,7 @@ Importing Modules
.. c:function:: PyObject* PyImport_ImportModuleLevel(const char *name, PyObject *globals, PyObject *locals, PyObject *fromlist, int level)
Similar to :c:func:`PyImport_ImportModuleLevelObject`, but the name is an
Similar to :c:func:`PyImport_ImportModuleLevelObject`, but the name is a
UTF-8 encoded string instead of a Unicode object.
.. versionchanged:: 3.3

View file

@ -49,7 +49,7 @@ Method Objects
.. index:: object: method
Methods are bound function objects. Methods are always bound to an instance of
an user-defined class. Unbound methods (methods bound to a class object) are
a user-defined class. Unbound methods (methods bound to a class object) are
no longer available.

View file

@ -50,7 +50,7 @@ Module Objects
.. c:function:: PyObject* PyModule_New(const char *name)
Similar to :c:func:`PyImport_NewObject`, but the name is an UTF-8 encoded
Similar to :c:func:`PyImport_NewObject`, but the name is a UTF-8 encoded
string instead of a Unicode object.

View file

@ -423,7 +423,7 @@ APIs:
.. c:function:: PyObject *PyUnicode_FromString(const char *u)
Create a Unicode object from an UTF-8 encoded null-terminated char buffer
Create a Unicode object from a UTF-8 encoded null-terminated char buffer
*u*.
@ -556,7 +556,7 @@ APIs:
.. c:function:: PyObject* PyUnicode_FromEncodedObject(PyObject *obj, \
const char *encoding, const char *errors)
Coerce an encoded object *obj* to an Unicode object and return a reference with
Coerce an encoded object *obj* to a Unicode object and return a reference with
incremented refcount.
:class:`bytes`, :class:`bytearray` and other
@ -1224,7 +1224,7 @@ These are the UTF-16 codec APIs:
If *Py_UNICODE_WIDE* is defined, a single :c:type:`Py_UNICODE` value may get
represented as a surrogate pair. If it is not defined, each :c:type:`Py_UNICODE`
values is interpreted as an UCS-2 character.
values is interpreted as a UCS-2 character.
Return *NULL* if an exception was raised by the codec.